qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 09/21] pc_piix: allow xenfv machine with XEN_EMULATE


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 09/21] pc_piix: allow xenfv machine with XEN_EMULATE
Date: Mon, 5 Dec 2022 23:06:40 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

On 5/12/22 18:31, David Woodhouse wrote:
From: Joao Martins <joao.m.martins@oracle.com>

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 | 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);
  }

?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]