]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: SVM: Skip OSVW MSR reads if KVM is treating all errata as present
authorSean Christopherson <seanjc@google.com>
Thu, 13 Nov 2025 23:14:17 +0000 (15:14 -0800)
committerSean Christopherson <seanjc@google.com>
Tue, 3 Mar 2026 20:23:26 +0000 (12:23 -0800)
commit089af84641b574990da97d4674706a0303abca34
tree4dbe3157b73b8b60c259e3a7a5f989a5453eb26c
parentf35043d0f973504e5f199be6287159dc5b373deb
KVM: SVM: Skip OSVW MSR reads if KVM is treating all errata as present

Don't bother reading the OSVW MSRs if osvw_len is already zero, i.e. if
KVM is already treating all errata as present, in which case the positive
path of the if-statement is one giant nop.

Opportunistically update the comment to more thoroughly explain how the
MSRs work and why the code does what it does.

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