Skip to content

KVM/x86/nVMX: Add field existence support in VMCS12

Robert Hoo kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: x86: nVMX: Add vmcs12 field existence bitmap in nested_vmxarch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/vmcs12.c arch/x86/kvm/vmx/vmcs12.h +2 more+405 -12 replies
2/5KVM: x86: nVMX: Update VMCS12 fields existence when nVMX MSRs are setarch/x86/kvm/vmx/nested.c+30 -02 replies
3/5KVM: x86: nVMX: VMCS12 field's read/write respects field existence bitmaparch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/vmcs12.h+47 -1627 replies
4/5KVM: x86: nVMX: Respect vmcs12 field existence when calc vmx_vmcs_enum_msrarch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/nested.h arch/x86/kvm/vmx/vmx.c+17 -40 replies
5/5KVM: x86: nVMX: Ignore user space set value to MSR_IA32_VMX_VMCS_ENUMarch/x86/kvm/vmx/nested.c+0 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/5] KVM/x86/nVMX: Add field existence support in VMCS12

SDM[1] has stated that many VMCS fields' existence depend on some other VMX feature's status.
In nested case, VMCS12 shall respect this, i.e., L0's VMCS configuration for L1 has limited the L1's VMX "physical" capability, some vmcs12.fields shall appear not exist when L1 vmread/vmwrite.

This patch set
1) Add a bitmap in nested_vmx to reflect vmcs12 fields' existence
2) Implement those update functions according to dependencies stated in SDM and update dynamically
3) Make VMCS12 read/write respect this
4) Make nested MSR_IA32_VMX_VMCS_ENUM read-only and respect this

[1] Notes in SDM Vol.3, Appedix B FIELD ENCODING IN VMCS
---
This patch set is a follow-up to Sean's suggestion in ba1f82456b (Dynamically compute max VMCS index for vmcs12).

Robert Hoo (5):
KVM: x86: nVMX: Add vmcs12 field existence bitmap in nested_vmx
KVM: x86: nVMX: Update VMCS12 fields existence when nVMX MSRs are set
KVM: x86: nVMX: VMCS12 field's read/write respects field existence
bitmap
KVM: x86: nVMX: Respect vmcs12 field existence when calc
vmx_vmcs_enum_msr
KVM: x86: nVMX: Ignore user space set value to MSR_IA32_VMX_VMCS_ENUM

 arch/x86/kvm/vmx/nested.c |  68 +++++--
 arch/x86/kvm/vmx/nested.h |   1 +
 arch/x86/kvm/vmx/vmcs12.c | 363 ++++++++++++++++++++++++++++++++++++++
 arch/x86/kvm/vmx/vmcs12.h |  69 ++++++--
 arch/x86/kvm/vmx/vmx.c    |  17 +-
 arch/x86/kvm/vmx/vmx.h    |   3 +
 6 files changed, 499 insertions(+), 22 deletions(-)

base-commit: 32bdc01988413031c6e743714c2b40bdd773e5db

Signature · 1 line
2.27.0