aboutsummaryrefslogtreecommitdiff
path: root/migration/savevm.c
diff options
context:
space:
mode:
authorAvihai Horon <avihaih@nvidia.com>2023-09-06 18:08:50 +0300
committerCédric Le Goater <clg@redhat.com>2023-09-11 08:34:06 +0200
commitf543aa222da183ac37424d1ea3a65e5fb6202732 (patch)
treedabaaaf2c56e1cc296967897687a68c9e65c420b /migration/savevm.c
parent8118349b1bc5c12e4017ddd7eb563fce752a5a9c (diff)
downloadqemu-f543aa222da183ac37424d1ea3a65e5fb6202732.zip
qemu-f543aa222da183ac37424d1ea3a65e5fb6202732.tar.gz
qemu-f543aa222da183ac37424d1ea3a65e5fb6202732.tar.bz2
migration: Move more initializations to migrate_init()
Initialization of mig_stats, compression_counters and VFIO bytes transferred is hard-coded in migration code path and snapshot code path. Make the code cleaner by initializing them in migrate_init(). Suggested-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Avihai Horon <avihaih@nvidia.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'migration/savevm.c')
-rw-r--r--migration/savevm.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index 5bf8b59..e14efec 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1620,9 +1620,6 @@ static int qemu_savevm_state(QEMUFile *f, Error **errp)
}
migrate_init(ms);
- memset(&mig_stats, 0, sizeof(mig_stats));
- memset(&compression_counters, 0, sizeof(compression_counters));
- migration_reset_vfio_bytes_transferred();
ms->to_dst_file = f;
qemu_mutex_unlock_iothread();