Now that we're close to being able to use the PV backends without actual
Xen, move the bus instantiation out from xen_hvm_init_pc() to pc_init1().
However, still only do it for (xen_mode == XEN_ATTACH) (i.e. when running
on true Xen) because we don't have XenStore ops for emulation yet, and
the XenBus instantiation failure is fatal. Once we have a functional
XenStore for emulated mode, this will become (xen_mode != XEN_DISABLED).
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
#include <xen/hvm/hvm_info_table.h>
#include "hw/xen/xen_pt.h"
#endif
+#ifdef CONFIG_XEN_BUS
+#include "hw/xen/xen-legacy-backend.h"
+#include "hw/xen/xen-bus.h"
+#endif
#include "hw/xen/xen-x86.h"
#include "hw/xen/xen.h"
#include "migration/global_state.h"
}
}
+#ifdef CONFIG_XEN_BUS
+ if (xen_mode == XEN_ATTACH) {
+ /* Initialize backend core & drivers */
+ xen_bus_init();
+
+ if (xen_be_init() != 0) {
+ error_report("xen backend core setup failed");
+ exit(1);
+ }
+ xen_be_register_common();
+ }
+#endif
+
pc_machine_init_sgx_epc(pcms);
x86_cpus_init(x86ms, pcmc->default_cpu_version);
#include "hw/i386/apic-msidef.h"
#include "hw/xen/xen_native.h"
#include "hw/xen/xen_backend_ops.h"
-#include "hw/xen/xen-legacy-backend.h"
-#include "hw/xen/xen-bus.h"
#include "hw/xen/xen-x86.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-migration.h"
QLIST_INIT(&state->dev_list);
device_listener_register(&state->device_listener);
- xen_bus_init();
-
- /* Initialize backend core & drivers */
- if (xen_be_init() != 0) {
- error_report("xen backend core setup failed");
- goto err;
- }
- xen_be_register_common();
-
QLIST_INIT(&xen_physmap);
xen_read_physmap(state);