]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Drop .post_leave_smm(), i.e. the manual post-RSM MMU reset
authorSean Christopherson <seanjc@google.com>
Wed, 9 Jun 2021 18:56:18 +0000 (11:56 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Jun 2021 17:09:35 +0000 (13:09 -0400)
commitd7357c119a7744efd4a314d789b8cd7b0d421298
tree5c1605434e6dec0024195f60c2bad2f3b23e82bf
parent8a57ff8b4fe3758283830039a41f4ac74ae73360
KVM: x86: Drop .post_leave_smm(), i.e. the manual post-RSM MMU reset

Drop the .post_leave_smm() emulator callback, which at this point is just
a wrapper to kvm_mmu_reset_context().  The manual context reset is
unnecessary, because unlike enter_smm() which calls vendor MSR/CR helpers
directly, em_rsm() bounces through the KVM helpers, e.g. kvm_set_cr4(),
which are responsible for processing side effects.  em_rsm() is already
subtly relying on this behavior as it doesn't manually do
kvm_update_cpuid_runtime(), e.g. to recognize CR4.OSXSAVE changes.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210609185619.992058-9-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c
arch/x86/kvm/kvm_emulate.h
arch/x86/kvm/x86.c