Skip to content

KVM: VMX: nVMX: Make eVMCS enablement more robust

Vitaly Kuznetsov kvm linux-hyperv lkml 2 versions – Applied

Status from this message: Queued (for 6.3), thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyApplied
  2. v14 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Simplify PATCH4 by not using evmcs_get_supported_ctls() and doing more macro magic to avoid having two evmcs_check_vmcs_conf{u32, u64} variants [Sean]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: nVMX: Sanitize primary processor-based VM-execution controls with eVMCS tooarch/x86/kvm/vmx/evmcs.c+12 -00 replies
2/4KVM: nVMX: Invert 'unsupported by eVMCSv1' checkarch/x86/kvm/vmx/evmcs.c arch/x86/kvm/vmx/evmcs.h+96 -360 replies
3/4KVM: nVMX: Prepare to sanitize tertiary execution controls with eVMCSarch/x86/kvm/vmx/evmcs.c arch/x86/kvm/vmx/evmcs.h+6 -00 replies
4/4KVM: VMX: Resurrect vmcs_conf sanitization for KVM-on-Hyper-Varch/x86/kvm/vmx/evmcs.c arch/x86/kvm/vmx/evmcs.h arch/x86/kvm/vmx/vmx.c+40 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/4] KVM: VMX: nVMX: Make eVMCS enablement more robust

Changes since v1:
- Simplify PATCH4 by not using evmcs_get_supported_ctls() and doing more macro magic to avoid having two evmcs_check_vmcs_conf{u32, u64} variants [Sean]

This is a continuation of "KVM: VMX: Support updated eVMCSv1 revision + use vmcs_config for L1 VMX MSRs" work:
https://lore.kernel.org/kvm/[email protected]/

and a preparation to enabling new eVMCS features for Hyper-V on KVM, namely nested TSC scaling.

Future proof KVM against two scenarios:
- nVMX: A new feature which doesn't have a corresponding eVMCSv1 field gets implemented in KVM but EVMCS1_UNSUPPORTED_* defines are left unchanged.
- VMX: A new feature supported by KVM but currently missing in eVMCSv1 gets implemented in a future Hyper-V version breaking KVM.

Note: 'vmx/evmcs.{c,h}' are renamed to 'vmx/hyperv.{c,h}' in
https://lore.kernel.org/kvm/[email protected]/

Vitaly Kuznetsov (4):
KVM: nVMX: Sanitize primary processor-based VM-execution controls with
eVMCS too
KVM: nVMX: Invert 'unsupported by eVMCSv1' check
KVM: nVMX: Prepare to sanitize tertiary execution controls with eVMCS
KVM: VMX: Resurrect vmcs_conf sanitization for KVM-on-Hyper-V

 arch/x86/kvm/vmx/evmcs.c | 88 +++++++++++++++++++++++++++++--------
 arch/x86/kvm/vmx/evmcs.h | 93 +++++++++++++++++++++++++++++++++-------
 arch/x86/kvm/vmx/vmx.c   |  5 +++
 3 files changed, 152 insertions(+), 34 deletions(-)
Signature · 1 line
2.38.1