KVM: VMX: Skip pointless MSR bitmap update when setting EFER
authorSean Christopherson <seanjc@google.com>
Tue, 13 Jul 2021 16:33:11 +0000 (09:33 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Aug 2021 15:01:56 +0000 (11:01 -0400)
commit400dd54b37172b64e4ceaa6bfaf2729585840375
treea9a9fe638499d68729111b9357fe078229a7e288
parentd0f9f826d8ac06446391ceb3d4a440f5b48b3134
KVM: VMX: Skip pointless MSR bitmap update when setting EFER

Split setup_msrs() into vmx_setup_uret_msrs() and an open coded refresh
of the MSR bitmap, and skip the latter when refreshing the user return
MSRs during an EFER load.  Only the x2APIC MSRs are dynamically exposed
and hidden, and those are not affected by a change in EFER.

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