]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Remove obsolete MSR bitmap refresh at vCPU RESET/INIT
authorSean Christopherson <seanjc@google.com>
Tue, 13 Jul 2021 16:33:15 +0000 (09:33 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Aug 2021 15:01:57 +0000 (11:01 -0400)
commit105082c12cde2a959cf5c0620b0f000374ec5e18
tree955d23b9e7f315aa415419b4ee5a3db824e383ce
parent60fff52c8c07d2b30a7b28bfc19e108ebbf6848f
KVM: VMX: Remove obsolete MSR bitmap refresh at vCPU RESET/INIT

Remove an unnecessary MSR bitmap refresh during vCPU RESET/INIT.  In both
cases, the MSR bitmap already has the desired values and state.

At RESET, the vCPU is guaranteed to be running with x2APIC disabled, the
x2APIC MSRs are guaranteed to be intercepted due to the MSR bitmap being
initialized to all ones by alloc_loaded_vmcs(), and vmx->msr_bitmap_mode
is guaranteed to be zero, i.e. reflecting x2APIC disabled.

At INIT, the APIC_BASE MSR is not modified, thus there can't be any
change in x2APIC state.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210713163324.627647-38-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c