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>
pci_create_simple(pcms->pcibus, -1, "xen-platform");
}
xen_bus_init();
- xen_be_init();
}
#endif
#include "hw/sysbus.h"
#include "hw/xen/xen.h"
#include "hw/xen/xen-backend.h"
+#include "hw/xen/xen-legacy-backend.h" /* xen_be_init() */
#include "hw/xen/xen-bus.h"
#include "hw/xen/xen-bus-helper.h"
#include "monitor/monitor.h"
goto fail;
}
+ /* Initialize legacy backend core & drivers */
+ xen_be_init();
+
if (xs_node_scanf(xenbus->xsh, XBT_NULL, "", /* domain root node */
"domid", NULL, "%u", &domid) == 1) {
xenbus->backend_id = domid;
xen_bus_init();
- xen_be_init();
-
return;
err:
{
setup_xen_backend_ops();
- /* Initialize backend core & drivers */
- xen_be_init();
+ xen_bus_init();
switch (xen_mode) {
case XEN_ATTACH:
vga_interface_created = true;
}
- xen_bus_init();
-
/* config cleanup hook */
atexit(xen_config_cleanup);
}