qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Discussion 02/10] NEED_CPU_H: remove '#include "cpu.h"


From: Xuebing wang
Subject: Re: [Qemu-devel] [Discussion 02/10] NEED_CPU_H: remove '#include "cpu.h"' from include/qemu-common.h
Date: Tue, 04 Mar 2014 20:19:32 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0


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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]