diff options
| author | Andreas Färber | 2013-01-20 20:23:22 +0100 |
|---|---|---|
| committer | Andreas Färber | 2013-03-12 10:35:54 +0100 |
| commit | b170fce3dd06372f7bfec9a780ebcb1fce6d57e4 (patch) | |
| tree | 2a182ba2a9ec97f929c90dbc2a674a59bc24511a /include/qom | |
| parent | stubs: Add a vmstate_dummy struct for CONFIG_USER_ONLY (diff) | |
| download | qemu-b170fce3dd06372f7bfec9a780ebcb1fce6d57e4.tar.gz qemu-b170fce3dd06372f7bfec9a780ebcb1fce6d57e4.tar.xz qemu-b170fce3dd06372f7bfec9a780ebcb1fce6d57e4.zip | |
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 ab2657c558..5b1b0d7ac4 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; |
