diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-20 20:23:22 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-03-12 10:35:54 +0100 |
commit | b170fce3dd06372f7bfec9a780ebcb1fce6d57e4 (patch) | |
tree | 2a182ba2a9ec97f929c90dbc2a674a59bc24511a /include/qom | |
parent | c71c3e99b8897323af8c2fe0b9851610cd148538 (diff) | |
download | qemu-b170fce3dd06372f7bfec9a780ebcb1fce6d57e4.zip qemu-b170fce3dd06372f7bfec9a780ebcb1fce6d57e4.tar.gz qemu-b170fce3dd06372f7bfec9a780ebcb1fce6d57e4.tar.bz2 |
cpu: Register VMStateDescription through CPUState
In comparison to DeviceClass::vmsd, CPU VMState is split in two,
"cpu_common" and "cpu", and uses cpu_index as instance_id instead of -1.
Therefore add a CPU-specific CPUClass::vmsd field.
Unlike the legacy CPUArchState registration, rather register CPUState.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r-- | include/qom/cpu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h index ab2657c..5b1b0d7 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -44,6 +44,7 @@ typedef struct CPUState CPUState; * @class_by_name: Callback to map -cpu command line model name to an * instantiatable CPU type. * @reset: Callback to reset the #CPUState to its initial state. + * @vmsd: State description for migration. * * Represents a CPU family or model. */ @@ -55,6 +56,8 @@ typedef struct CPUClass { ObjectClass *(*class_by_name)(const char *cpu_model); void (*reset)(CPUState *cpu); + + const struct VMStateDescription *vmsd; } CPUClass; struct KVMState; |