Skip to content

Fix nested VMX controls MSRs

Chenyi Qiang kvm lkml 1 version Applied

Status from this message: Queued patch 1/4/5, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 13 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5KVM: nVMX: Fix VMX controls MSRs setup when nested VMX enabledarch/x86/kvm/vmx/nested.c+4 -25 replies
2/5KVM: nVMX: Verify the VMX controls MSRs with the global capability when setting VMX MSRsarch/x86/kvm/vmx/nested.c+51 -202 replies
3/5KVM: nVMX: Update VMX controls MSR according to guest CPUID after setting VMX MSRsarch/x86/kvm/vmx/vmx.c+5 -14 replies
4/5KVM: nVMX: Fix the update value of nested load IA32_PERF_GLOBAL_CTRL controlarch/x86/kvm/vmx/nested.c+1 -11 reply
5/5KVM: nVMX: Simplify the initialization of nested_vmx_msrsarch/x86/kvm/vmx/vmx.c+1 -20 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchXiaoyao LiJim Mattson
1/5R-b
2/5
3/5
4/5R-b R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] Fix nested VMX controls MSRs

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(-)
Signature · 1 line
2.17.1