]> xenbits.xensource.com Git - osstest/qemu.git/commitdiff
pc: Require xen when initializing xenfv machine
authorEduardo Habkost <ehabkost@redhat.com>
Mon, 28 Sep 2015 20:01:23 +0000 (17:01 -0300)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 19 Oct 2015 10:16:01 +0000 (10:16 +0000)
Without this check, the xen-platform device will crash on reset
if using the accel option with anything other than xen (e.g.
"-machine xenfv,accel=kvm").

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/i386/pc_piix.c

index ae7bbebd0f08a5857d65fe6cb7c64892fab440eb..a91cc3dada6d504ac5781233a10b3f3609150b8d 100644 (file)
@@ -434,6 +434,11 @@ static void pc_xen_hvm_init(MachineState *machine)
 {
     PCIBus *bus;
 
+    if (!xen_enabled()) {
+        error_report("xenfv machine requires the xen accelerator");
+        exit(1);
+    }
+
     pc_xen_hvm_init_pci(machine);
 
     bus = pci_find_primary_bus();