summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorLadi Prosek <lprosek@redhat.com>2017-10-11 16:54:41 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-10-12 14:01:55 +0200
commit72d7b374b14d67e973bce476e4a75552478cc42d (patch)
tree6124240991e78d9e00afd6328e9650523bfe8669 /arch/x86/kvm/x86.c
parent0234bf885236a41ef05376039f2a8ebe7028a388 (diff)
downloadlwn-72d7b374b14d67e973bce476e4a75552478cc42d.tar.gz
lwn-72d7b374b14d67e973bce476e4a75552478cc42d.zip
KVM: x86: introduce ISA specific smi_allowed callback
Similar to NMI, there may be ISA specific reasons why an SMI cannot be injected into the guest. This commit adds a new smi_allowed callback to be implemented in following commits. Signed-off-by: Ladi Prosek <lprosek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 9e85a69ccb12..693bf8d01128 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6438,7 +6438,7 @@ static int inject_pending_event(struct kvm_vcpu *vcpu, bool req_int_win)
}
kvm_x86_ops->queue_exception(vcpu);
- } else if (vcpu->arch.smi_pending && !is_smm(vcpu)) {
+ } else if (vcpu->arch.smi_pending && !is_smm(vcpu) && kvm_x86_ops->smi_allowed(vcpu)) {
vcpu->arch.smi_pending = false;
enter_smm(vcpu);
} else if (vcpu->arch.nmi_pending && kvm_x86_ops->nmi_allowed(vcpu)) {