linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] KVM: VMX: Add helper+macros to do sec exec adjustment
@ 2020-09-23 16:50 Sean Christopherson
  2020-09-23 16:50 ` [PATCH 1/4] KVM: VMX: Rename vmx_*_supported() helpers to cpu_has_vmx_*() Sean Christopherson
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Sean Christopherson @ 2020-09-23 16:50 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
	Joerg Roedel, kvm, linux-kernel

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

-- 
2.28.0


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

end of thread, other threads:[~2020-09-25 20:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 16:50 [PATCH 0/4] KVM: VMX: Add helper+macros to do sec exec adjustment Sean Christopherson
2020-09-23 16:50 ` [PATCH 1/4] KVM: VMX: Rename vmx_*_supported() helpers to cpu_has_vmx_*() Sean Christopherson
2020-09-23 16:50 ` [PATCH 2/4] KVM: VMX: Unconditionally clear CPUID.INVPCID if !CPUID.PCID Sean Christopherson
2020-09-23 17:15   ` Jim Mattson
2020-09-23 17:25     ` Paolo Bonzini
2020-09-23 16:50 ` [PATCH 3/4] KVM: VMX: Rename RDTSCP secondary exec control name to insert "ENABLE" Sean Christopherson
2020-09-23 17:10   ` Jim Mattson
2020-09-23 16:50 ` [PATCH 4/4] KVM: VMX: Add a helper and macros to reduce boilerplate for sec exec ctls Sean Christopherson
2020-09-23 17:20   ` Paolo Bonzini
2020-09-23 17:22     ` Sean Christopherson
2020-09-23 17:25       ` Paolo Bonzini
     [not found]         ` <20200925003011.21016-1-sean.j.christopherson@intel.com>
2020-09-25 20:21           ` [PATCH v2 " Paolo Bonzini

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