index 367eda1..f0157e3 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -510,18 +510,4 @@ void qemu_init_vcpu(CPUState *cpu); */ void cpu_single_step(CPUState *cpu, int enabled);-#ifdef CONFIG_SOFTMMU -extern const struct VMStateDescription vmstate_cpu_common; -#else -#define vmstate_cpu_common vmstate_dummy -#endif --#define VMSTATE_CPU() { \- .name = "parent_obj", \ - .size = sizeof(CPUState), \ - .vmsd = &vmstate_cpu_common, \- .flags = VMS_STRUCT, \ - .offset = 0, \-} -Like Andreas I don't like this particularly. You can add migration/vmstate.h to qom/cpu.h instead.
In my humble opinion, qom/cpu is part of virtual machine along with other hw peripherals, thus I'd prefer vmstate to depend on qom/cpu.
From object oriented design perspective, qom/cpu is one-level lower than the modeling of virtual machine, do you agree?