KVM: x86: Use KVM-governed feature framework to track "LAM enabled"
authorBinbin Wu <binbin.wu@linux.intel.com>
Wed, 13 Sep 2023 12:42:24 +0000 (20:42 +0800)
committerSean Christopherson <seanjc@google.com>
Wed, 29 Nov 2023 01:54:09 +0000 (17:54 -0800)
commit183bdd161c2b773a62f01d1c030f5a3a5b7c33b5
tree7dd91a109e258ba29e2d57e889e7edea8860eee2
parent703d794cb8cb28c07b22c1c845f5c4d4c419aff7
KVM: x86: Use KVM-governed feature framework to track "LAM enabled"

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>
arch/x86/kvm/cpuid.h
arch/x86/kvm/governed_features.h
arch/x86/kvm/mmu.h
arch/x86/kvm/vmx/vmx.c