Skip to content

Commit

Permalink
KVM: x86: Advertise and enable LAM (user and supervisor)
Browse files Browse the repository at this point in the history
Upstream commit: 703d794
Conflict: none

LAM is enumerated by CPUID.7.1:EAX.LAM[bit 26]. Advertise the feature to
userspace and enable it as the final step after the LAM virtualization
support for supervisor and user pointers.

SGX LAM support is not advertised yet. SGX LAM support is enumerated in
SGX's own CPUID and there's no hard requirement that it must be supported
when LAM is reported in CPUID leaf 0x7.

Intel-SIG: commit 703d794 KVM: x86: Advertise and enable LAM (user
and supervisor)
Backport KVM Linear Address Masking (LAM) support.

Signed-off-by: Robert Hoo <[email protected]>
Signed-off-by: Binbin Wu <[email protected]>
Reviewed-by: Jingqi Liu <[email protected]>
Reviewed-by: Chao Gao <[email protected]>
Reviewed-by: Kai Huang <[email protected]>
Tested-by: Xuelian Guo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
[ Zhiquan Li: amend commit log ]
Signed-off-by: Zhiquan Li <[email protected]>
  • Loading branch information
robert-hoo authored and Avenger-285714 committed Dec 27, 2024
1 parent 1ffdf6a commit 979f0ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ void kvm_set_cpu_caps(void)
kvm_cpu_cap_mask(CPUID_7_1_EAX,
F(AVX_VNNI) | F(AVX512_BF16) | F(CMPCCXADD) |
F(FZRM) | F(FSRS) | F(FSRC) |
F(AMX_FP16) | F(AVX_IFMA)
F(AMX_FP16) | F(AVX_IFMA) | F(LAM)
);

kvm_cpu_cap_init_kvm_defined(CPUID_7_1_EDX,
Expand Down

0 comments on commit 979f0ff

Please sign in to comment.