aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2019-08-22 12:54:33 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2019-09-12 11:15:03 +0100
commitce62df5378bd66963b3e096b86b31f342f001cfe (patch)
tree651c7457f213ee9215b601e2347bfe7dcef0725c /migration
parentfd418e520eca16e3b148633ed23ec20b14db9b0c (diff)
downloadqemu-arm-ce62df5378bd66963b3e096b86b31f342f001cfe.tar.gz
migration: register_savevm_live doesn't need dev
Commit 78dd48df3 removed the last caller of register_savevm_live for an instantiable device (rather than a single system wide device); so trim out the parameter. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190822115433.12070-1-dgilbert@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/block-dirty-bitmap.c2
-rw-r--r--migration/block.c2
-rw-r--r--migration/ram.c2
-rw-r--r--migration/savevm.c23
4 files changed, 4 insertions, 25 deletions
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
index dd40724b9e..5121f86d73 100644
--- a/migration/block-dirty-bitmap.c
+++ b/migration/block-dirty-bitmap.c
@@ -733,7 +733,7 @@ void dirty_bitmap_mig_init(void)
{
QSIMPLEQ_INIT(&dirty_bitmap_mig_state.dbms_list);
- register_savevm_live(NULL, "dirty-bitmap", 0, 1,
+ register_savevm_live("dirty-bitmap", 0, 1,
&savevm_dirty_bitmap_handlers,
&dirty_bitmap_mig_state);
}
diff --git a/migration/block.c b/migration/block.c
index aa747b55fa..0de9d84198 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -1030,6 +1030,6 @@ void blk_mig_init(void)
QSIMPLEQ_INIT(&block_mig_state.blk_list);
qemu_mutex_init(&block_mig_state.lock);
- register_savevm_live(NULL, "block", 0, 1, &savevm_block_handlers,
+ register_savevm_live("block", 0, 1, &savevm_block_handlers,
&block_mig_state);
}
diff --git a/migration/ram.c b/migration/ram.c
index 0047286b7e..01df326767 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -4675,5 +4675,5 @@ static SaveVMHandlers savevm_ram_handlers = {
void ram_mig_init(void)
{
qemu_mutex_init(&XBZRLE.lock);
- register_savevm_live(NULL, "ram", 0, 4, &savevm_ram_handlers, &ram_state);
+ register_savevm_live("ram", 0, 4, &savevm_ram_handlers, &ram_state);
}
diff --git a/migration/savevm.c b/migration/savevm.c
index 35426d1db8..3454bc937e 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -684,8 +684,7 @@ static void savevm_state_handler_insert(SaveStateEntry *nse)
of the system, so instance_id should be removed/replaced.
Meanwhile pass -1 as instance_id if you do not already have a clearly
distinguishing id for all instances of your device class. */
-int register_savevm_live(DeviceState *dev,
- const char *idstr,
+int register_savevm_live(const char *idstr,
int instance_id,
int version_id,
const SaveVMHandlers *ops,
@@ -704,26 +703,6 @@ int register_savevm_live(DeviceState *dev,
se->is_ram = 1;
}
- if (dev) {
- char *id = qdev_get_dev_path(dev);
- if (id) {
- if (snprintf(se->idstr, sizeof(se->idstr), "%s/", id) >=
- sizeof(se->idstr)) {
- error_report("Path too long for VMState (%s)", id);
- g_free(id);
- g_free(se);
-
- return -1;
- }
- g_free(id);
-
- se->compat = g_new0(CompatEntry, 1);
- pstrcpy(se->compat->idstr, sizeof(se->compat->idstr), idstr);
- se->compat->instance_id = instance_id == -1 ?
- calculate_compat_instance_id(idstr) : instance_id;
- instance_id = -1;
- }
- }
pstrcat(se->idstr, sizeof(se->idstr), idstr);
if (instance_id == -1) {