Browse Source

KVM: x86: fix SMI to halted VCPU

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

Fixes: 64d6067057d9658acb8675afcfba549abdb7fc16
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini 9 years ago
parent
commit
7391773933
1 changed files with 3 additions and 0 deletions
  1. 3 0
      arch/x86/kvm/x86.c

+ 3 - 0
arch/x86/kvm/x86.c

@@ -7781,6 +7781,9 @@ static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu)
 	if (atomic_read(&vcpu->arch.nmi_queued))
 	if (atomic_read(&vcpu->arch.nmi_queued))
 		return true;
 		return true;
 
 
+	if (test_bit(KVM_REQ_SMI, &vcpu->requests))
+		return true;
+
 	if (kvm_arch_interrupt_allowed(vcpu) &&
 	if (kvm_arch_interrupt_allowed(vcpu) &&
 	    kvm_cpu_has_interrupt(vcpu))
 	    kvm_cpu_has_interrupt(vcpu))
 		return true;
 		return true;