pc_piix: allow xenfv machine with XEN_EMULATE
authorJoao Martins <joao.m.martins@oracle.com>
Mon, 5 Dec 2022 15:10:57 +0000 (15:10 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 7 Dec 2022 16:19:48 +0000 (16:19 +0000)
This allows -machine xenfv to work with Xen emulated guests.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
hw/i386/pc_piix.c

index 3dcac2f4b6374472fd957a73744e94acc690615e..d1127adde08b21ad1ee079450cf867994dbee495 100644 (file)
@@ -404,8 +404,8 @@ static void pc_xen_hvm_init(MachineState *machine)
 {
     PCMachineState *pcms = PC_MACHINE(machine);
 
-    if (!xen_enabled()) {
-        error_report("xenfv machine requires the xen accelerator");
+    if (!xen_enabled() && (xen_mode != XEN_EMULATE)) {
+        error_report("xenfv machine requires the xen or kvm accelerator");
         exit(1);
     }