Commit a97d6fe6 authored by Paul Durrant's avatar Paul Durrant Committed by Stefano Stabellini
Browse files

Allow use of pc machine type (accel=xen) for Xen HVM domains.

Xen HVM domains normally spawn QEMU with a dedicated xenfv machine type. The
initialization code for this machine type can easily be pulled into the
generic pc initialization code and guarded with a test for whether the xen
accelerator options is specified, which is more consistent with the way
other accelerators are used.
Signed-off-by: default avatarPaul Durrant <>
Signed-off-by: default avatarStefano Stabellini <>
parent fc744bb1
......@@ -91,6 +91,11 @@ static void pc_init1(MemoryRegion *system_memory,
DeviceState *icc_bridge;
FWCfgState *fw_cfg = NULL;
if (xen_enabled() && xen_hvm_init() != 0) {
fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
object_property_add_child(qdev_get_machine(), "icc-bridge",
OBJECT(icc_bridge), NULL);
......@@ -320,9 +325,6 @@ static void pc_init_isa(QEMUMachineInitArgs *args)
static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
if (xen_hvm_init() != 0) {
hw_error("xen hardware virtual machine initialisation failed");
......@@ -63,3 +63,8 @@ void qmp_xen_set_global_dirty_log(bool enable, Error **errp)
void xen_modified_memory(ram_addr_t start, ram_addr_t length)
int xen_hvm_init(void)
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment