aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index fd0d51320d..4c5cc0d8ad 100644
--- a/vl.c
+++ b/vl.c
@@ -3039,6 +3039,7 @@ int main(int argc, char **argv, char **envp)
module_call_init(MODULE_INIT_OPTS);
runstate_init();
+ precopy_infrastructure_init();
postcopy_infrastructure_init();
monitor_init_globals();
@@ -4579,6 +4580,12 @@ int main(int argc, char **argv, char **envp)
gdbserver_cleanup();
+ /*
+ * cleaning up the migration object cancels any existing migration
+ * try to do this early so that it also stops using devices.
+ */
+ migration_shutdown();
+
/* No more vcpu or device emulation activity beyond this point */
vm_shutdown();
@@ -4594,7 +4601,6 @@ int main(int argc, char **argv, char **envp)
monitor_cleanup();
qemu_chr_cleanup();
user_creatable_cleanup();
- migration_object_finalize();
/* TODO: unref root container, check all devices are ok */
return 0;