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>
This commit is contained in:
Eduardo Habkost 2015-09-28 17:01:23 -03:00 committed by Stefano Stabellini
parent aedc880617
commit a88ae0d44b
1 changed files with 5 additions and 0 deletions

View 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();