[PATCH 4.2 38/54] KVM: x86: fix SMI to halted VCPU

From: Greg Kroah-Hartman
Date: Fri Oct 23 2015 - 13:48:08 EST


4.2-stable review patch. If anyone has any objections, please let me know.

------------------

From: Paolo Bonzini <pbonzini@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
arch/x86/kvm/x86.c | 3 +++
1 file changed, 3 insertions(+)

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -8030,6 +8030,9 @@ static inline bool kvm_vcpu_has_events(s
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;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/