]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Allow use of pc machine type (accel=xen) for Xen HVM domains.
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 25 Jun 2013 11:46:37 +0000 (11:46 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 25 Jun 2013 12:00:48 +0000 (12:00 +0000)
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: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/i386/pc_piix.c
xen-stub.c

index 523baac6edb8e536742758f70c7596dc227622b0..2782e1d260182952d9a26b5c8d98096d389e639a 100644 (file)
@@ -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");
+        exit(1);
+    }
+
     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)
 #ifdef CONFIG_XEN
 static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
 {
-    if (xen_hvm_init() != 0) {
-        hw_error("xen hardware virtual machine initialisation failed");
-    }
     pc_init_pci(args);
 }
 #endif
index 6f0516aa3eaa340b33fd16a999b5710743ab7070..47c8e73e0fff90b35bb54f4b21a61c3d51feed46 100644 (file)
@@ -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;
+}