kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/5] KVM/x86/nVMX: Add field existence support in VMCS12
@ 2021-08-17  9:31 Robert Hoo
  2021-08-17  9:31 ` [PATCH v1 1/5] KVM: x86: nVMX: Add vmcs12 field existence bitmap in nested_vmx Robert Hoo
                   ` (4 more replies)
  0 siblings, 5 replies; 37+ messages in thread
From: Robert Hoo @ 2021-08-17  9:31 UTC (permalink / raw)
  To: seanjc, pbonzini, vkuznets, wanpengli, jmattson, joro
  Cc: kvm, yu.c.zhang, Robert Hoo

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
-- 
2.27.0


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

end of thread, other threads:[~2021-11-19  7:32 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17  9:31 [PATCH v1 0/5] KVM/x86/nVMX: Add field existence support in VMCS12 Robert Hoo
2021-08-17  9:31 ` [PATCH v1 1/5] KVM: x86: nVMX: Add vmcs12 field existence bitmap in nested_vmx Robert Hoo
2021-10-20 15:10   ` Paolo Bonzini
2021-10-21 12:41     ` Robert Hoo
2021-08-17  9:31 ` [PATCH v1 2/5] KVM: x86: nVMX: Update VMCS12 fields existence when nVMX MSRs are set Robert Hoo
2021-10-20 15:11   ` Paolo Bonzini
2021-10-21 13:08     ` Robert Hoo
2021-08-17  9:31 ` [PATCH v1 3/5] KVM: x86: nVMX: VMCS12 field's read/write respects field existence bitmap Robert Hoo
2021-08-17 15:54   ` Sean Christopherson
2021-08-18  5:50     ` Robert Hoo
2021-08-18 23:10       ` Sean Christopherson
2021-08-18 23:45         ` Jim Mattson
2021-08-18 23:49           ` Sean Christopherson
2021-08-19  9:58         ` Robert Hoo
2021-09-01 20:42           ` Sean Christopherson
2021-09-03  8:51             ` Robert Hoo
2021-09-03 15:11               ` Sean Christopherson
2021-09-28 10:05                 ` Robert Hoo
2021-10-05 16:15                   ` Sean Christopherson
2021-10-05 17:32                     ` Jim Mattson
2021-10-05 17:59                       ` Sean Christopherson
2021-10-05 20:42                         ` Jim Mattson
2021-10-05 20:50                           ` Sean Christopherson
2021-10-05 22:40                             ` Jim Mattson
2021-10-05 23:22                               ` Sean Christopherson
2021-10-08  8:23                                 ` Yu Zhang
2021-10-08 15:09                                   ` Robert Hoo
2021-10-08 23:49                                     ` Jim Mattson
2021-10-09  0:05                                       ` Robert Hoo
2021-10-29 19:53                                         ` Jim Mattson
2021-11-03  1:31                                           ` Robert Hoo
2021-11-09 22:33                                             ` Sean Christopherson
2021-11-10  5:35                                               ` Yu Zhang
2021-11-18  1:19                                                 ` Sean Christopherson
2021-11-19  7:32                                                   ` Robert Hoo
2021-08-17  9:31 ` [PATCH v1 4/5] KVM: x86: nVMX: Respect vmcs12 field existence when calc vmx_vmcs_enum_msr Robert Hoo
2021-08-17  9:31 ` [PATCH v1 5/5] KVM: x86: nVMX: Ignore user space set value to MSR_IA32_VMX_VMCS_ENUM Robert Hoo

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).