On 5/12/22 18:31, David Woodhouse wrote:
From: Joao Martins <joao.m.mart...@oracle.com>
This allows -machine xenfv to work with Xen emulated guests.
Signed-off-by: Joao Martins <joao.m.mart...@oracle.com>
Signed-off-by: David Woodhouse <d...@amazon.co.uk>
---
hw/i386/pc_piix.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 3dcac2f4b6..d1127adde0 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -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);
}
What about the XEN_EMULATE case? Shouldn't this be:
if (!xen_enabled()) {
if (xen_mode == XEN_EMULATE) {
error_report("xenfv machine requires the xen accelerator");
} else {
error_report("xenfv machine requires the xen or kvm accelerator");
}
exit(1);
}
?