aboutsummaryrefslogtreecommitdiffstats
path: root/hw/hw.h
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2010-06-25 11:09:07 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2010-07-06 10:36:28 -0500
commit0be71e324f774a77243f1a1487f468232d69542b (patch)
treef3ac4560e61b5874fd359da3ada9bd371c25efc4 /hw/hw.h
parent4f43c1ff3b8ce99de80db7c51423e5ba8b143802 (diff)
savevm: Add DeviceState param
When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/hw.h')
-rw-r--r--hw/hw.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/hw/hw.h b/hw/hw.h
index a49d86653..c2de6fe8c 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -245,14 +245,16 @@ typedef int SaveLiveStateHandler(Monitor *mon, QEMUFile *f, int stage,
void *opaque);
typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
-int register_savevm(const char *idstr,
+int register_savevm(DeviceState *dev,
+ const char *idstr,
int instance_id,
int version_id,
SaveStateHandler *save_state,
LoadStateHandler *load_state,
void *opaque);
-int register_savevm_live(const char *idstr,
+int register_savevm_live(DeviceState *dev,
+ const char *idstr,
int instance_id,
int version_id,
SaveSetParamsHandler *set_params,
@@ -261,7 +263,7 @@ int register_savevm_live(const char *idstr,
LoadStateHandler *load_state,
void *opaque);
-void unregister_savevm(const char *idstr, void *opaque);
+void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque);
typedef void QEMUResetHandler(void *opaque);
@@ -765,11 +767,13 @@ extern int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque, int version_id);
extern void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque);
-extern int vmstate_register(int instance_id, const VMStateDescription *vmsd,
- void *base);
-extern int vmstate_register_with_alias_id(int instance_id,
+extern int vmstate_register(DeviceState *dev, int instance_id,
+ const VMStateDescription *vmsd, void *base);
+extern int vmstate_register_with_alias_id(DeviceState *dev,
+ int instance_id,
const VMStateDescription *vmsd,
void *base, int alias_id,
int required_for_version);
-void vmstate_unregister(const VMStateDescription *vmsd, void *opaque);
+void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,
+ void *opaque);
#endif