migration: Move the VMStateDescription typedef to typedefs.h
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>
diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h
index b3e8a82..4619530 100644
--- a/target/alpha/cpu.h
+++ b/target/alpha/cpu.h
@@ -277,7 +277,7 @@
#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);
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 94c990c..2cdde6c 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -922,7 +922,7 @@
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);
diff --git a/target/cris/cpu.h b/target/cris/cpu.h
index fb14ad5..aba0a66 100644
--- a/target/cris/cpu.h
+++ b/target/cris/cpu.h
@@ -183,7 +183,7 @@
#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);
diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h
index e9fba96..4b816cc 100644
--- a/target/hppa/cpu.h
+++ b/target/hppa/cpu.h
@@ -334,7 +334,7 @@
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
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 8b3dc55..ecd0ec0 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1516,7 +1516,7 @@
#ifndef CONFIG_USER_ONLY
-extern struct VMStateDescription vmstate_x86_cpu;
+extern VMStateDescription vmstate_x86_cpu;
#endif
/**
diff --git a/target/lm32/cpu.h b/target/lm32/cpu.h
index c2bbfa2..064c6b1 100644
--- a/target/lm32/cpu.h
+++ b/target/lm32/cpu.h
@@ -195,7 +195,7 @@
#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);
diff --git a/target/mips/internal.h b/target/mips/internal.h
index b2b41a5..d5aa549 100644
--- a/target/mips/internal.h
+++ b/target/mips/internal.h
@@ -148,7 +148,7 @@
#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)
diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h
index f23b252..61ade1d 100644
--- a/target/openrisc/cpu.h
+++ b/target/openrisc/cpu.h
@@ -333,7 +333,7 @@
#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);
diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
index be9b4c3..a2f202f 100644
--- a/target/ppc/cpu-qom.h
+++ b/target/ppc/cpu-qom.h
@@ -203,7 +203,7 @@
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)), \
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index c9beba2..4ea33cf 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1255,7 +1255,7 @@
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
/*****************************************************************************/
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index a606547..3d9de25 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -163,7 +163,7 @@
#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 */
diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
index 8ed2250..0d5b01e 100644
--- a/target/sparc/cpu.h
+++ b/target/sparc/cpu.h
@@ -532,7 +532,7 @@
#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);