summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2015-09-28 17:01:23 -0300
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2015-10-19 10:16:01 +0000
commita88ae0d44b6b5830b752641b2198735272f13eaf (patch)
tree2a2cec585e226d733debd1ff25df5dc7d080c064 /hw
parentaedc8806172dd1ae904f04169ee3b19fce1d7893 (diff)
downloadhqemu-a88ae0d44b6b5830b752641b2198735272f13eaf.zip
hqemu-a88ae0d44b6b5830b752641b2198735272f13eaf.tar.gz
pc: Require xen when initializing xenfv machine
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/pc_piix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ae7bbeb..a91cc3d 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -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();
OpenPOWER on IntegriCloud