summary refs log tree commit diff stats
path: root/hw/xenpv/xen_machine_pv.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-05-09 19:00:37 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-05-10 15:45:15 +0200
commit0973996fe47bfca8f0bf552728e36682d642c9cc (patch)
tree61be2ed1097e6349790d89a444936bd30d854a4a /hw/xenpv/xen_machine_pv.c
parentfa5365e8b6eff888e99f31cd65afefd3643e5d0e (diff)
downloadfocaccia-qemu-0973996fe47bfca8f0bf552728e36682d642c9cc.tar.gz
focaccia-qemu-0973996fe47bfca8f0bf552728e36682d642c9cc.zip
xen: initialize legacy backends from xen_bus_init()
Prepare for moving the calls to xen_be_register() under the
control of xen_bus_init(), using the normal xen_backend_init()
method that is used by the "modern" backends.

This requires the xenstore global variable to be initialized,
which is done by xen_be_init().  To ensure that everything is
ready at the time the xen_backend_init() functions are called,
remove the xen_be_init() function from all the boards and
place it directly in xen_bus_init().

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240509170044.190795-7-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/xenpv/xen_machine_pv.c')
-rw-r--r--hw/xenpv/xen_machine_pv.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
index 1130d1a147..b500ce0989 100644
--- a/hw/xenpv/xen_machine_pv.c
+++ b/hw/xenpv/xen_machine_pv.c
@@ -34,8 +34,7 @@ static void xen_init_pv(MachineState *machine)
 {
     setup_xen_backend_ops();
 
-    /* Initialize backend core & drivers */
-    xen_be_init();
+    xen_bus_init();
 
     switch (xen_mode) {
     case XEN_ATTACH:
@@ -60,8 +59,6 @@ static void xen_init_pv(MachineState *machine)
         vga_interface_created = true;
     }
 
-    xen_bus_init();
-
     /* config cleanup hook */
     atexit(xen_config_cleanup);
 }