Commit a88ae0d4 authored by Eduardo Habkost's avatar Eduardo Habkost Committed by Stefano Stabellini
Browse files

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: default avatarEduardo Habkost <ehabkost@redhat.com>
Reviewed-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
parent aedc8806
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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();