[PATCH v2 0/2] KVM: SVM: Handle EferLmsleUnsupported

Jim Mattson posted 2 patches 4 months, 1 week ago
arch/x86/include/asm/cpufeatures.h | 1 +
arch/x86/kvm/cpuid.c               | 1 +
arch/x86/kvm/svm/svm.c             | 4 +++-
3 files changed, 5 insertions(+), 1 deletion(-)
[PATCH v2 0/2] KVM: SVM: Handle EferLmsleUnsupported
Posted by Jim Mattson 4 months, 1 week ago
It is no longer the case that EFER.LMSLE is supported by all SVM-capable
processors. AMD enumerates the absence of this feature by CPUID
Fn8000_0008_EBX[EferLmlseUnsupported](bit 20)=1.

Advertise this defeature bit to userspace via KVM_GET_SUPPORTED_CPUID,
and don't allow a guest to set EFER.LMSLE on hardware that doesn't
support the feature.

Jim Mattson (2):
  KVM: x86: Advertise EferLmsleUnsupported to userspace
  KVM: SVM: Disallow EFER.LMSLE when not supported by hardware

 arch/x86/include/asm/cpufeatures.h | 1 +
 arch/x86/kvm/cpuid.c               | 1 +
 arch/x86/kvm/svm/svm.c             | 4 +++-
 3 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.51.0.618.g983fd99d29-goog
Re: [PATCH v2 0/2] KVM: SVM: Handle EferLmsleUnsupported
Posted by Sean Christopherson 3 months, 2 weeks ago
On Tue, 30 Sep 2025 17:14:06 -0700, Jim Mattson wrote:
> It is no longer the case that EFER.LMSLE is supported by all SVM-capable
> processors. AMD enumerates the absence of this feature by CPUID
> Fn8000_0008_EBX[EferLmlseUnsupported](bit 20)=1.
> 
> Advertise this defeature bit to userspace via KVM_GET_SUPPORTED_CPUID,
> and don't allow a guest to set EFER.LMSLE on hardware that doesn't
> support the feature.
> 
> [...]

Applied to kvm-x86 svm, thanks!

[1/2] KVM: x86: Advertise EferLmsleUnsupported to userspace
      https://github.com/kvm-x86/linux/commit/4793f990ea15
[2/2] KVM: SVM: Disallow EFER.LMSLE when not supported by hardware
      https://github.com/kvm-x86/linux/commit/c53c632592a4

--
https://github.com/kvm-x86/linux/tree/next