]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: SVM: Skip OSVW MSR reads if current CPU doesn't support the feature
authorSean Christopherson <seanjc@google.com>
Thu, 13 Nov 2025 23:14:20 +0000 (15:14 -0800)
committerSean Christopherson <seanjc@google.com>
Tue, 3 Mar 2026 20:23:26 +0000 (12:23 -0800)
commita56444d5e7387effbc61d6b98fe5d68897017fc9
tree98fcdd2f7a3afbaa09138b4051a568f6d8d63688
parent3b7a320e491c87c6d25928f6798c2efeef2be0e8
KVM: SVM: Skip OSVW MSR reads if current CPU doesn't support the feature

Skip the OSVW RDMSRs if the current CPU doesn't enumerate support for the
MSRs.  In practice, checking only the boot CPU's capabilities is
sufficient, as the RDMSRs should fault when unsupported, but there's no
downside to being more precise, and checking only the boot CPU _looks_
wrong given the rather odd semantics of the MSRs.  E.g. if a CPU doesn't
support OVSW, then KVM must assume all errata are present.

Link: https://patch.msgid.link/20251113231420.1695919-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/svm.c