KVM: x86: replace is_smm checks with kvm_x86_ops.smi_allowed
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Apr 2020 15:02:36 +0000 (11:02 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 May 2020 16:14:31 +0000 (12:14 -0400)
commita9fa7cb6aa997ba58294f1a07d402ce5855bafe1
tree2c1b49be8347793f84747492bdde4c7e3aea3814
parent88c604b66eb6a74841cd40f5bdf639112ad69115
KVM: x86: replace is_smm checks with kvm_x86_ops.smi_allowed

Do not hardcode is_smm so that all the architectural conditions for
blocking SMIs are listed in a single place.  Well, in two places because
this introduces some code duplication between Intel and AMD.

This ensures that nested SVM obeys GIF in kvm_vcpu_has_events.

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