]> xenbits.xensource.com Git - people/pauldu/qemu.git/commitdiff
migration: Move the VMStateDescription typedef to typedefs.h
authorMarkus Armbruster <armbru@redhat.com>
Mon, 12 Aug 2019 05:23:44 +0000 (07:23 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 16 Aug 2019 11:31:52 +0000 (13:31 +0200)
We declare incomplete struct VMStateDescription in a couple of places
so we don't have to include migration/vmstate.h for the typedef.
That's fine with me.  However, the next commit will drop
migration/vmstate.h from a massive number of compiles.  Move the
typedef to qemu/typedefs.h now, so I don't have to insert struct in
front of VMStateDescription all over the place then.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190812052359.30071-15-armbru@redhat.com>

16 files changed:
include/hw/qdev-core.h
include/migration/vmstate.h
include/qemu/typedefs.h
include/qom/cpu.h
target/alpha/cpu.h
target/arm/cpu.h
target/cris/cpu.h
target/hppa/cpu.h
target/i386/cpu.h
target/lm32/cpu.h
target/mips/internal.h
target/openrisc/cpu.h
target/ppc/cpu-qom.h
target/ppc/cpu.h
target/s390x/cpu.h
target/sparc/cpu.h

index b870c8ceebfc489c3cfc6ad1e7165793153de65b..e5b62dd2fc0eac3376032ba79d977670e75e2d0f 100644 (file)
@@ -35,8 +35,6 @@ typedef void (*DeviceReset)(DeviceState *dev);
 typedef void (*BusRealize)(BusState *bus, Error **errp);
 typedef void (*BusUnrealize)(BusState *bus, Error **errp);
 
-struct VMStateDescription;
-
 /**
  * DeviceClass:
  * @props: Properties accessing state fields.
@@ -112,7 +110,7 @@ typedef struct DeviceClass {
     DeviceUnrealize unrealize;
 
     /* device state */
-    const struct VMStateDescription *vmsd;
+    const VMStateDescription *vmsd;
 
     /* Private to qdev / bus.  */
     const char *bus_type;
@@ -425,7 +423,7 @@ void device_class_set_parent_unrealize(DeviceClass *dc,
                                        DeviceUnrealize dev_unrealize,
                                        DeviceUnrealize *parent_unrealize);
 
-const struct VMStateDescription *qdev_get_vmsd(DeviceState *dev);
+const VMStateDescription *qdev_get_vmsd(DeviceState *dev);
 
 const char *qdev_fw_name(DeviceState *dev);
 
index c2bfa7a7f0ca926e792ac050423ca5c9c276ab61..1fbfd099dd974f5a4e6bca91c1951b8adf3d834e 100644 (file)
@@ -28,7 +28,6 @@
 #define QEMU_VMSTATE_H
 
 typedef struct VMStateInfo VMStateInfo;
-typedef struct VMStateDescription VMStateDescription;
 typedef struct VMStateField VMStateField;
 
 /* VMStateInfo allows customized migration of objects that don't fit in
index 2738343bf7c3b930ae3a69c9a706d0f1d611ee48..a95ad6a11368999bfc6cca4dc12062369d3c34d4 100644 (file)
@@ -117,6 +117,7 @@ typedef struct SHPCDevice SHPCDevice;
 typedef struct SSIBus SSIBus;
 typedef struct VirtIODevice VirtIODevice;
 typedef struct Visitor Visitor;
+typedef struct VMStateDescription VMStateDescription;
 
 /*
  * Pointer types
index 5ee0046b629b3d92c5b93f47d0a9b8b71464c6dc..ddb91bbaffbb6fbd3e9efeeb3e725d27f82b4f67 100644 (file)
@@ -215,7 +215,7 @@ typedef struct CPUClass {
     int (*write_elf32_qemunote)(WriteCoreDumpFunction f, CPUState *cpu,
                                 void *opaque);
 
-    const struct VMStateDescription *vmsd;
+    const VMStateDescription *vmsd;
     const char *gdb_core_xml_file;
     gchar * (*gdb_arch_name)(CPUState *cpu);
     const char * (*gdb_get_dynamic_xml)(CPUState *cpu, const char *xmlname);
@@ -1108,7 +1108,7 @@ bool target_words_bigendian(void);
 #ifdef NEED_CPU_H
 
 #ifdef CONFIG_SOFTMMU
-extern const struct VMStateDescription vmstate_cpu_common;
+extern const VMStateDescription vmstate_cpu_common;
 #else
 #define vmstate_cpu_common vmstate_dummy
 #endif
index b3e8a823e12a7ad6b51f94476453bc4fc7e7c684..46195306603adf73d22d368c58ca9d1099f46d32 100644 (file)
@@ -277,7 +277,7 @@ struct AlphaCPU {
 
 
 #ifndef CONFIG_USER_ONLY
-extern const struct VMStateDescription vmstate_alpha_cpu;
+extern const VMStateDescription vmstate_alpha_cpu;
 #endif
 
 void alpha_cpu_do_interrupt(CPUState *cpu);
index 94c990cddbd81eebebe3984441acd4ce178dfd74..2cdde6c4bcb9e595eb6a6efbb8f8decc1e75e58d 100644 (file)
@@ -922,7 +922,7 @@ void arm_cpu_post_init(Object *obj);
 uint64_t arm_cpu_mp_affinity(int idx, uint8_t clustersz);
 
 #ifndef CONFIG_USER_ONLY
-extern const struct VMStateDescription vmstate_arm_cpu;
+extern const VMStateDescription vmstate_arm_cpu;
 #endif
 
 void arm_cpu_do_interrupt(CPUState *cpu);
index fb14ad51f10a3b0f7a838ed2f18342aa9867bce6..aba0a664744a6f7da327af4a049fdb05adf29256 100644 (file)
@@ -183,7 +183,7 @@ struct CRISCPU {
 
 
 #ifndef CONFIG_USER_ONLY
-extern const struct VMStateDescription vmstate_cris_cpu;
+extern const VMStateDescription vmstate_cris_cpu;
 #endif
 
 void cris_cpu_do_interrupt(CPUState *cpu);
index e9fba96be9dfe89fcd13fa9dd788ac396f837009..4b816cc13aa988a4e77008f21962eec604c3a063 100644 (file)
@@ -334,7 +334,7 @@ bool hppa_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
 int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
                               int type, hwaddr *pphys, int *pprot);
 extern const MemoryRegionOps hppa_io_eir_ops;
-extern const struct VMStateDescription vmstate_hppa_cpu;
+extern const VMStateDescription vmstate_hppa_cpu;
 void hppa_cpu_alarm_timer(void *);
 int hppa_artype_for_page(CPUHPPAState *env, target_ulong vaddr);
 #endif
index 8b3dc5533e6994bf9066f88f1a5e75e8b6dddea9..ecd0ec08996dd70dc345b2b0d87bcf2787bd3db2 100644 (file)
@@ -1516,7 +1516,7 @@ struct X86CPU {
 
 
 #ifndef CONFIG_USER_ONLY
-extern struct VMStateDescription vmstate_x86_cpu;
+extern VMStateDescription vmstate_x86_cpu;
 #endif
 
 /**
index c2bbfa278083d755e97b46275e384de81219c9af..064c6b1267e4d8fea86a6494d6065e53ec9dce6f 100644 (file)
@@ -195,7 +195,7 @@ struct LM32CPU {
 
 
 #ifndef CONFIG_USER_ONLY
-extern const struct VMStateDescription vmstate_lm32_cpu;
+extern const VMStateDescription vmstate_lm32_cpu;
 #endif
 
 void lm32_cpu_do_interrupt(CPUState *cpu);
index b2b41a51ab400311b6dfb617014905835e826a6b..d5aa5490d3c39fd598cf1262987cb32504232ea9 100644 (file)
@@ -148,7 +148,7 @@ hwaddr cpu_mips_translate_address(CPUMIPSState *env, target_ulong address,
 #define cpu_signal_handler cpu_mips_signal_handler
 
 #ifndef CONFIG_USER_ONLY
-extern const struct VMStateDescription vmstate_mips_cpu;
+extern const VMStateDescription vmstate_mips_cpu;
 #endif
 
 static inline bool cpu_mips_hw_interrupts_enabled(CPUMIPSState *env)
index f23b25262d6f0570f8721b13739b5e3f97fd2181..61ade1d4f082636edc5068fc834102a420636387 100644 (file)
@@ -333,7 +333,7 @@ int print_insn_or1k(bfd_vma addr, disassemble_info *info);
 #define cpu_signal_handler cpu_openrisc_signal_handler
 
 #ifndef CONFIG_USER_ONLY
-extern const struct VMStateDescription vmstate_openrisc_cpu;
+extern const VMStateDescription vmstate_openrisc_cpu;
 
 /* hw/openrisc_pic.c */
 void cpu_openrisc_pic_init(OpenRISCCPU *cpu);
index be9b4c30c382a4388b87c18b8d791bda25f87466..a2f202f02183362cc8d8db5f671533b1b095a4ac 100644 (file)
@@ -203,7 +203,7 @@ typedef struct PPCTimebase {
     int64_t time_of_the_day_ns;
 } PPCTimebase;
 
-extern const struct VMStateDescription vmstate_ppc_timebase;
+extern const VMStateDescription vmstate_ppc_timebase;
 
 #define VMSTATE_PPC_TIMEBASE_V(_field, _state, _version) {            \
     .name       = (stringify(_field)),                                \
index c9beba2a5c01ac5ef23e66d39fcf9076e43d91f8..4ea33cf6960c733cc0e754f1619d635f451dc42e 100644 (file)
@@ -1255,7 +1255,7 @@ int ppc32_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs,
                                int cpuid, void *opaque);
 #ifndef CONFIG_USER_ONLY
 void ppc_cpu_do_system_reset(CPUState *cs);
-extern const struct VMStateDescription vmstate_ppc_cpu;
+extern const VMStateDescription vmstate_ppc_cpu;
 #endif
 
 /*****************************************************************************/
index a606547b4dd404a7c5025283b27fb6abe384ae6f..3d9de25f7ce346e39fbe440db7887517aab00d62 100644 (file)
@@ -163,7 +163,7 @@ struct S390CPU {
 
 
 #ifndef CONFIG_USER_ONLY
-extern const struct VMStateDescription vmstate_s390_cpu;
+extern const VMStateDescription vmstate_s390_cpu;
 #endif
 
 /* distinguish between 24 bit and 31 bit addressing */
index 8ed2250cd034d57d4754b4ee77219b22b3a7d522..0d5b01efe52eb5e0e9398ea84d241cdfc76520ef 100644 (file)
@@ -532,7 +532,7 @@ struct SPARCCPU {
 
 
 #ifndef CONFIG_USER_ONLY
-extern const struct VMStateDescription vmstate_sparc_cpu;
+extern const VMStateDescription vmstate_sparc_cpu;
 #endif
 
 void sparc_cpu_do_interrupt(CPUState *cpu);