qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/3] i386: Make Hyper-V related sections KVM only


From: Paolo Bonzini
Subject: Re: [PATCH 1/3] i386: Make Hyper-V related sections KVM only
Date: Thu, 18 Mar 2021 17:06:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 18/03/21 17:02, Vitaly Kuznetsov wrote:
Currently, Hyper-V enlightenments are only implemented by KVM so there's no
need to have corresponding vmstate_x86_cpu sections when !CONFIG_KVM.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

I expect WHPX may implement at least some, so I'll leave this out.

Paolo

---
  target/i386/machine.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/target/i386/machine.c b/target/i386/machine.c
index 3967dfc25763..a4777a73b0a9 100644
--- a/target/i386/machine.c
+++ b/target/i386/machine.c
@@ -697,6 +697,7 @@ static const VMStateDescription vmstate_mpx = {
      }
  };
+#ifdef CONFIG_KVM
  static bool hyperv_hypercall_enable_needed(void *opaque)
  {
      X86CPU *cpu = opaque;
@@ -895,6 +896,7 @@ static const VMStateDescription 
vmstate_msr_hyperv_reenlightenment = {
          VMSTATE_END_OF_LIST()
      }
  };
+#endif
static bool avx512_needed(void *opaque)
  {
@@ -1484,6 +1486,7 @@ VMStateDescription vmstate_x86_cpu = {
          &vmstate_msr_ia32_feature_control,
          &vmstate_msr_architectural_pmu,
          &vmstate_mpx,
+#ifdef CONFIG_KVM
          &vmstate_msr_hypercall_hypercall,
          &vmstate_msr_hyperv_vapic,
          &vmstate_msr_hyperv_time,
@@ -1492,6 +1495,7 @@ VMStateDescription vmstate_x86_cpu = {
          &vmstate_msr_hyperv_synic,
          &vmstate_msr_hyperv_stimer,
          &vmstate_msr_hyperv_reenlightenment,
+#endif
          &vmstate_avx512,
          &vmstate_xss,
          &vmstate_umwait,





reply via email to

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