]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Skip filter updates for MSRs that KVM is already intercepting
authorSean Christopherson <seanjc@google.com>
Fri, 10 Jun 2022 21:41:40 +0000 (21:41 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 Jun 2022 12:10:21 +0000 (08:10 -0400)
commitae817d559f0fbf6ec6713d7052e3a19bd82bd009
treecced00d4ebf7c268403074200b20353bcfb89e7c
parent7647f79af378ab93fabd67272d0f34999ba76875
KVM: VMX: Skip filter updates for MSRs that KVM is already intercepting

When handling userspace MSR filter updates, recompute interception for
possible passthrough MSRs if and only if KVM wants to disabled
interception.  If KVM wants to intercept accesses, i.e. the associated
bit is set in vmx->shadow_msr_intercept, then there's no need to set the
intercept again as KVM will intercept the MSR regardless of userspace's
wants.

No functional change intended, the call to vmx_enable_intercept_for_msr()
really is just a gigantic nop.

Suggested-by: Aaron Lewis <aaronlewis@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220610214140.612025-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c