]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nSVM: Move SMI vmexit handling to svm_check_nested_events()
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Apr 2020 12:17:28 +0000 (08:17 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 May 2020 16:14:38 +0000 (12:14 -0400)
commit8db1cd70d80b2d8f288df1660420e1a32adb4654
tree30008edbeb26ad9c600a072b1177dca875f21e82
parent4224636af0f1e23d99a5460fb80963c21ca33e42
KVM: nSVM: Move SMI vmexit handling to svm_check_nested_events()

Unlike VMX, SVM allows a hypervisor to take a SMI vmexit without having
any special SMM-monitor enablement sequence.  Therefore, it has to be
handled like interrupts and NMIs.  Check for an unblocked SMI in
svm_check_nested_events() so that pending SMIs are correctly prioritized
over IRQs and NMIs when the latter events will trigger VM-Exit.

Note that there is no need to test explicitly for SMI vmexits, because
guests always runs outside SMM and therefore can never get an SMI while
they are blocked.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h