From 1a8f46f8d61ef885ff9d0bda251e4e9830c932ef Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Thu, 21 May 2015 13:24:16 +0100 Subject: Move loadvm_handlers into MigrationIncomingState In postcopy we need the loadvm_handlers to be used in a couple of different instances of the loadvm loop/routine, and thus it can't be local any more. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- include/migration/migration.h | 5 +++++ include/migration/vmstate.h | 2 ++ include/qemu/typedefs.h | 1 + 3 files changed, 8 insertions(+) (limited to 'include') diff --git a/include/migration/migration.h b/include/migration/migration.h index 1323e3d..720a949 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -42,9 +42,14 @@ struct MigrationParams { typedef struct MigrationState MigrationState; +typedef QLIST_HEAD(, LoadStateEntry) LoadStateEntry_Head; + /* State for the incoming migration */ struct MigrationIncomingState { QEMUFile *file; + + /* See savevm.c */ + LoadStateEntry_Head loadvm_handlers; }; MigrationIncomingState *migration_incoming_get_current(void); diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index fc5e643..7153b1e 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -808,6 +808,8 @@ extern const VMStateInfo vmstate_info_bitmap; #define SELF_ANNOUNCE_ROUNDS 5 +void loadvm_free_handlers(MigrationIncomingState *mis); + int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd, void *opaque, int version_id); void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd, diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 74dfad3..6fdcbcd 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -31,6 +31,7 @@ typedef struct I2CBus I2CBus; typedef struct I2SCodec I2SCodec; typedef struct ISABus ISABus; typedef struct ISADevice ISADevice; +typedef struct LoadStateEntry LoadStateEntry; typedef struct MACAddr MACAddr; typedef struct MachineClass MachineClass; typedef struct MachineState MachineState; -- cgit v1.1