qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v3 05/38] i386/kvm: handle Xen HVM cpuid leaves


From: Paul Durrant
Subject: Re: [RFC PATCH v3 05/38] i386/kvm: handle Xen HVM cpuid leaves
Date: Tue, 20 Dec 2022 14:58:29 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

On 16/12/2022 00:40, David Woodhouse wrote:
From: Joao Martins <joao.m.martins@oracle.com>

Introduce support for emulating CPUID for Xen HVM guests. It doesn't make
sense to advertise the KVM leaves to a Xen guest, so do it unconditionally
when the xen-version machine property is set.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
[dwmw2: Obtain xen_version from machine property, make it automatic]
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
  target/i386/cpu.c         |  1 +
  target/i386/cpu.h         |  2 +
  target/i386/kvm/kvm.c     | 78 +++++++++++++++++++++++++++++++++++++--
  target/i386/kvm/xen-emu.c |  4 +-
  target/i386/kvm/xen-emu.h | 13 ++++++-
  5 files changed, 91 insertions(+), 7 deletions(-)

[snip]
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index a98995d4d7..5977edb1ca 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -22,6 +22,7 @@
#include <linux/kvm.h>
  #include "standard-headers/asm-x86/kvm_para.h"
+#include "standard-headers/xen/arch-x86/cpuid.h"
#include "cpu.h"
  #include "host-cpu.h"
@@ -1750,7 +1751,6 @@ int kvm_arch_init_vcpu(CPUState *cs)
      int max_nested_state_len;
      int r;
      Error *local_err = NULL;
-
      memset(&cpuid_data, 0, sizeof(cpuid_data));

nit: this seems to be a gratuitous whitespace change

      cpuid_i = 0;

With that fixed...

Reviewed-by: Paul Durrant <paul@xen.org>




reply via email to

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