linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Fix nested VMX controls MSRs
@ 2020-08-28  8:56 Chenyi Qiang
  2020-08-28  8:56 ` [PATCH 1/5] KVM: nVMX: Fix VMX controls MSRs setup when nested VMX enabled Chenyi Qiang
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Chenyi Qiang @ 2020-08-28  8:56 UTC (permalink / raw)
  To: Paolo Bonzini, Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li,
	Jim Mattson, Joerg Roedel, Xiaoyao Li
  Cc: kvm, linux-kernel

The first three patches fix a issue for the nested VMX controls MSRs. The
issue happens when I use QEMU to run nested VM. The VM_{ENTRY,
EXIT}_LOAD_IA32_PERF_GLOBAL_CTRL and VM_{ENTRY_LOAD, EXIT_CLEAR}_BNDCFGS
in L1 MSR_IA32_VMX_TRUE_{ENTRY, EXIT}_CTLS MSR are always cleared
regardless of whether it supports in L1. This is because QEMU gets the
nested VMX MSRs from vmcs_config.nested_vmx_msrs which doesn't expose
these two fields. Then, when QEMU initializes the features MSRs after
SET_CPUID, it will override the nested VMX MSR values which has been
updated according to guest CPUID during SET_CPUID. This patch series
just expose the missing fields in nested VMX {ENTRY, EXIT} controls
MSR and adds the support to update nested VMX MSRs after set_vmx_msrs.

The last two patches are a minor fix and cleanup.

Chenyi Qiang (5):
  KVM: nVMX: Fix VMX controls MSRs setup when nested VMX enabled
  KVM: nVMX: Verify the VMX controls MSRs with the global capability
    when setting VMX MSRs
  KVM: nVMX: Update VMX controls MSR according to guest CPUID after
    setting VMX MSRs
  KVM: nVMX: Fix the update value of nested load IA32_PERF_GLOBAL_CTRL
    control
  KVM: nVMX: Simplify the initialization of nested_vmx_msrs

 arch/x86/kvm/vmx/nested.c | 79 +++++++++++++++++++++++++++------------
 arch/x86/kvm/vmx/vmx.c    |  9 +++--
 2 files changed, 62 insertions(+), 26 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-09-11 17:11 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28  8:56 [PATCH 0/5] Fix nested VMX controls MSRs Chenyi Qiang
2020-08-28  8:56 ` [PATCH 1/5] KVM: nVMX: Fix VMX controls MSRs setup when nested VMX enabled Chenyi Qiang
2020-08-28 17:43   ` Jim Mattson
2020-08-29  1:49     ` Chenyi Qiang
2020-08-29  2:51       ` Xiaoyao Li
2020-08-31 17:36         ` Jim Mattson
2020-09-01  3:27   ` Xiaoyao Li
2020-08-28  8:56 ` [PATCH 2/5] KVM: nVMX: Verify the VMX controls MSRs with the global capability when setting VMX MSRs Chenyi Qiang
2020-08-28 18:23   ` Jim Mattson
2020-08-31  3:15     ` Chenyi Qiang
2020-08-28  8:56 ` [PATCH 3/5] KVM: nVMX: Update VMX controls MSR according to guest CPUID after " Chenyi Qiang
2020-08-28 20:39   ` Jim Mattson
2020-09-02 18:16     ` Sean Christopherson
2020-09-02 18:32       ` Jim Mattson
2020-09-11 17:09         ` Paolo Bonzini
2020-08-28  8:56 ` [PATCH 4/5] KVM: nVMX: Fix the update value of nested load IA32_PERF_GLOBAL_CTRL control Chenyi Qiang
2020-08-28 18:29   ` Jim Mattson
2020-08-28  8:56 ` [PATCH 5/5] KVM: nVMX: Simplify the initialization of nested_vmx_msrs Chenyi Qiang
2020-09-11 17:11 ` [PATCH 0/5] Fix nested VMX controls MSRs Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).