]> 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)
commit64e0b70abf436d55dfa69351acd291695321f747
tree30008edbeb26ad9c600a072b1177dca875f21e82
parentfd201833e566e6e7d880f6ff843a23778969640d
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