Skip to content

KVM: VMX: Add helper+macros to do sec exec adjustment

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Queued with the rest, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 7 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: VMX: Rename vmx_*_supported() helpers to cpu_has_vmx_*()arch/x86/kvm/vmx/capabilities.h arch/x86/kvm/vmx/vmx.c+11 -110 replies
2/4KVM: VMX: Unconditionally clear CPUID.INVPCID if !CPUID.PCIDarch/x86/kvm/vmx/vmx.c+11 -52 replies
3/4KVM: VMX: Rename RDTSCP secondary exec control name to insert "ENABLE"arch/x86/include/asm/vmx.h arch/x86/kvm/vmx/capabilities.h arch/x86/kvm/vmx/nested.c +2 more+10 -101 reply
4/4KVM: VMX: Add a helper and macros to reduce boilerplate for sec exec ctlsarch/x86/kvm/vmx/vmx.c+41 -874 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchJim Mattson
1/4
2/4
3/4R-b
4/4

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/4] KVM: VMX: Add helper+macros to do sec exec adjustment

Add a helper function and macro wrappers to consolidate code for adjusting secondary execution controls based on guest CPUID. The adjustments are effectively 10+ lines of copy+paste for each control, with slight tweaks to account for annoying differences, e.g. XSAVES has additional checks.

Patches 1-3 are prep work to make INVPCID and RDTSCP align with the "standard" nomenclature so that they don't require special casing.

Sean Christopherson (4):
KVM: VMX: Rename vmx_*_supported() helpers to cpu_has_vmx_*()
KVM: VMX: Unconditionally clear CPUID.INVPCID if !CPUID.PCID
KVM: VMX: Rename RDTSCP secondary exec control name to insert "ENABLE"
KVM: VMX: Add a helper and macros to reduce boilerplate for sec exec
ctls

 arch/x86/include/asm/vmx.h                    |   2 +-
 arch/x86/kvm/vmx/capabilities.h               |  10 +-
 arch/x86/kvm/vmx/nested.c                     |   4 +-
 arch/x86/kvm/vmx/vmx.c                        | 150 +++++++-----------
 .../selftests/kvm/include/x86_64/vmx.h        |   2 +-
 5 files changed, 64 insertions(+), 104 deletions(-)
Signature · 1 line
2.28.0