summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2023-04-19 12:17:37 -0400
committerJuan Quintela <quintela@redhat.com>2023-04-24 11:29:01 +0200
commitcb9d8b8ce1aaf38f53295fc59ec1b8b7eb4338d2 (patch)
tree48356cbb6e47c63cb1b4af4c386db02ad610fc61
parentfa45f8dab9613993c042176ea2d25552bfebc955 (diff)
downloadfocaccia-qemu-cb9d8b8ce1aaf38f53295fc59ec1b8b7eb4338d2.tar.gz
focaccia-qemu-cb9d8b8ce1aaf38f53295fc59ec1b8b7eb4338d2.zip
vl.c: Create late backends before migration object
The migration object may want to check against different types of memory
when initialized.  Delay the creation to be after late backends.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r--softmmu/vl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 5cb72a56fc..fb6c221e8e 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3584,13 +3584,18 @@ void qemu_init(int argc, char **argv)
     }
 
     /*
+     * Create backends before creating migration objects, so that it can
+     * check against compatibilities on the backend memories (e.g. postcopy
+     * over memory-backend-file objects).
+     */
+    qemu_create_late_backends();
+
+    /*
      * Note: creates a QOM object, must run only after global and
      * compat properties have been set up.
      */
     migration_object_init();
 
-    qemu_create_late_backends();
-
     /* parse features once if machine provides default cpu_type */
     current_machine->cpu_type = machine_class->default_cpu_type;
     if (cpu_option) {