From: Peter Xu Date: Wed, 19 Apr 2023 16:17:37 +0000 (-0400) Subject: vl.c: Create late backends before migration object X-Git-Tag: pull-xen-20230607~105^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cb9d8b8ce1aaf38f53295fc59ec1b8b7eb4338d2;p=people%2Faperard%2Fqemu-dm.git 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 Reviewed-by: Juan Quintela Reviewed-by: David Hildenbrand Signed-off-by: Juan Quintela --- diff --git a/softmmu/vl.c b/softmmu/vl.c index 5cb72a56fc..fb6c221e8e 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -3583,14 +3583,19 @@ void qemu_init(int argc, char **argv) machine_class->name, machine_class->deprecation_reason); } + /* + * 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) {