mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 17:11:33 +00:00
183bdd161c
Use the governed feature framework to track if Linear Address Masking (LAM) is "enabled", i.e. if LAM can be used by the guest. Using the framework to avoid the relative expensive call guest_cpuid_has() during cr3 and vmexit handling paths for LAM. No functional change intended. Signed-off-by: Binbin Wu <binbin.wu@linux.intel.com> Tested-by: Xuelian Guo <xuelian.guo@intel.com> Link: https://lore.kernel.org/r/20230913124227.12574-14-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson <seanjc@google.com>
23 lines
674 B
C
23 lines
674 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#if !defined(KVM_GOVERNED_FEATURE) || defined(KVM_GOVERNED_X86_FEATURE)
|
|
BUILD_BUG()
|
|
#endif
|
|
|
|
#define KVM_GOVERNED_X86_FEATURE(x) KVM_GOVERNED_FEATURE(X86_FEATURE_##x)
|
|
|
|
KVM_GOVERNED_X86_FEATURE(GBPAGES)
|
|
KVM_GOVERNED_X86_FEATURE(XSAVES)
|
|
KVM_GOVERNED_X86_FEATURE(VMX)
|
|
KVM_GOVERNED_X86_FEATURE(NRIPS)
|
|
KVM_GOVERNED_X86_FEATURE(TSCRATEMSR)
|
|
KVM_GOVERNED_X86_FEATURE(V_VMSAVE_VMLOAD)
|
|
KVM_GOVERNED_X86_FEATURE(LBRV)
|
|
KVM_GOVERNED_X86_FEATURE(PAUSEFILTER)
|
|
KVM_GOVERNED_X86_FEATURE(PFTHRESHOLD)
|
|
KVM_GOVERNED_X86_FEATURE(VGIF)
|
|
KVM_GOVERNED_X86_FEATURE(VNMI)
|
|
KVM_GOVERNED_X86_FEATURE(LAM)
|
|
|
|
#undef KVM_GOVERNED_X86_FEATURE
|
|
#undef KVM_GOVERNED_FEATURE
|