diff options
| author | Anthony Liguori | 2013-08-02 00:09:35 +0200 |
|---|---|---|
| committer | Anthony Liguori | 2013-08-02 00:09:35 +0200 |
| commit | 2ddc463725d0fa24e0910fba77fef2777fa94a74 (patch) | |
| tree | b9b21406cf7762806a0d50b48b3c530cfa70a551 | |
| parent | Merge remote-tracking branch 'afaerber/tags/prep-for-upstream' into staging (diff) | |
| parent | cpu: Fix VMSTATE_CPU() semantics (diff) | |
| download | qemu-2ddc463725d0fa24e0910fba77fef2777fa94a74.tar.gz qemu-2ddc463725d0fa24e0910fba77fef2777fa94a74.tar.xz qemu-2ddc463725d0fa24e0910fba77fef2777fa94a74.zip | |
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings
* Clean up AlphaCPU and OpenRISCCPU migration
# gpg: Signature made Wed 31 Jul 2013 04:57:59 PM CDT using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found
# By Andreas Färber
# Via Andreas Färber
* afaerber/tags/qom-cpu-for-anthony:
cpu: Fix VMSTATE_CPU() semantics
| -rw-r--r-- | exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -402,11 +402,14 @@ void cpu_exec_init(CPUArchState *env) #if defined(CONFIG_USER_ONLY) cpu_list_unlock(); #endif - vmstate_register(NULL, cpu_index, &vmstate_cpu_common, cpu); + if (qdev_get_vmsd(DEVICE(cpu)) == NULL) { + vmstate_register(NULL, cpu_index, &vmstate_cpu_common, cpu); + } #if defined(CPU_SAVE_VERSION) && !defined(CONFIG_USER_ONLY) register_savevm(NULL, "cpu", cpu_index, CPU_SAVE_VERSION, cpu_save, cpu_load, env); assert(cc->vmsd == NULL); + assert(qdev_get_vmsd(DEVICE(cpu)) == NULL); #endif if (cc->vmsd != NULL) { vmstate_register(NULL, cpu_index, cc->vmsd, cpu); |
