]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: x86: fix SMI to halted VCPU
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 Oct 2015 08:19:35 +0000 (10:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Oct 2015 00:53:40 +0000 (09:53 +0900)
commit 73917739334c6509833b0403b81d4a04a8784bdf upstream.

An SMI to a halted VCPU must wake it up, hence a VCPU with a pending
SMI must be considered runnable.

Fixes: 64d6067057d9658acb8675afcfba549abdb7fc16
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c

index f0cd0b8ae35220f21cf6fe86e87e742b710cd8bb..373328b71599d5e097b0a4b75abea8ebf73ce8f9 100644 (file)
@@ -8030,6 +8030,9 @@ static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu)
        if (atomic_read(&vcpu->arch.nmi_queued))
                return true;
 
+       if (test_bit(KVM_REQ_SMI, &vcpu->requests))
+               return true;
+
        if (kvm_arch_interrupt_allowed(vcpu) &&
            kvm_cpu_has_interrupt(vcpu))
                return true;