diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-08-01 17:09:35 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-08-01 17:09:35 -0500 |
commit | 2ddc463725d0fa24e0910fba77fef2777fa94a74 (patch) | |
tree | b9b21406cf7762806a0d50b48b3c530cfa70a551 | |
parent | 00f90df09368035fcfe6a06cd87a6c88f82f2afe (diff) | |
parent | e0d479445876676f3f92e1bc6d5f92d4bb2500f8 (diff) | |
download | qemu-2ddc463725d0fa24e0910fba77fef2777fa94a74.zip qemu-2ddc463725d0fa24e0910fba77fef2777fa94a74.tar.gz qemu-2ddc463725d0fa24e0910fba77fef2777fa94a74.tar.bz2 |
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); |