aboutsummaryrefslogtreecommitdiff
path: root/vmstate.h
diff options
context:
space:
mode:
Diffstat (limited to 'vmstate.h')
-rw-r--r--vmstate.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/vmstate.h b/vmstate.h
index 5af45e0..5bd2b76 100644
--- a/vmstate.h
+++ b/vmstate.h
@@ -26,11 +26,20 @@
#ifndef QEMU_VMSTATE_H
#define QEMU_VMSTATE_H 1
-typedef void SaveSetParamsHandler(const MigrationParams *params, void * opaque);
typedef void SaveStateHandler(QEMUFile *f, void *opaque);
-typedef int SaveLiveStateHandler(QEMUFile *f, int stage, void *opaque);
typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
+typedef struct SaveVMHandlers {
+ void (*set_params)(const MigrationParams *params, void * opaque);
+ SaveStateHandler *save_state;
+ int (*save_live_setup)(QEMUFile *f, void *opaque);
+ int (*save_live_iterate)(QEMUFile *f, void *opaque);
+ int (*save_live_complete)(QEMUFile *f, void *opaque);
+ void (*cancel)(void *opaque);
+ LoadStateHandler *load_state;
+ bool (*is_active)(void *opaque);
+} SaveVMHandlers;
+
int register_savevm(DeviceState *dev,
const char *idstr,
int instance_id,
@@ -43,10 +52,7 @@ int register_savevm_live(DeviceState *dev,
const char *idstr,
int instance_id,
int version_id,
- SaveSetParamsHandler *set_params,
- SaveLiveStateHandler *save_live_state,
- SaveStateHandler *save_state,
- LoadStateHandler *load_state,
+ SaveVMHandlers *ops,
void *opaque);
void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque);