Commit 8a9358cc authored by Markus Armbruster's avatar Markus Armbruster
Browse files

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: default avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190812052359.30071-15-armbru@redhat.com>
parent 6a0acfff
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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);

+0 −1
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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);
Loading