]> Gentwo Git Trees - linux/.git/commit
KVM: x86: Advertise support for the immediate form of MSR instructions
authorXin Li <xin@zytor.com>
Tue, 5 Aug 2025 20:22:24 +0000 (13:22 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 19 Aug 2025 18:59:47 +0000 (11:59 -0700)
commitd90ebf5a06ecc6d4d7f72d12c5029519af8f838d
tree5c53fd560088a539f80138800f432994759d2aa6
parentec93675a325191c95bc322a4471c2f194f7211fc
KVM: x86: Advertise support for the immediate form of MSR instructions

Advertise support for the immediate form of MSR instructions to userspace
if the instructions are supported by the underlying CPU, and KVM is using
VMX, i.e. is running on an Intel-compatible CPU.

For SVM, explicitly clear X86_FEATURE_MSR_IMM to ensure KVM doesn't over-
report support if AMD-compatible CPUs ever implement the immediate forms,
as SVM will likely require explicit enablement in KVM.

Signed-off-by: Xin Li (Intel) <xin@zytor.com>
[sean: massage changelog]
Link: https://lore.kernel.org/r/20250805202224.1475590-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/cpuid.c
arch/x86/kvm/reverse_cpuid.h
arch/x86/kvm/svm/svm.c