From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932351AbbJWRr1 (ORCPT ); Fri, 23 Oct 2015 13:47:27 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40933 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753173AbbJWRpm (ORCPT ); Fri, 23 Oct 2015 13:45:42 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Bonzini Subject: [PATCH 4.2 38/54] KVM: x86: fix SMI to halted VCPU Date: Fri, 23 Oct 2015 10:45:14 -0700 Message-Id: <20151023174520.229743218@linuxfoundation.org> X-Mailer: git-send-email 2.6.1 In-Reply-To: <20151023174519.086915553@linuxfoundation.org> References: <20151023174519.086915553@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Paolo Bonzini 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 Signed-off-by: Greg Kroah-Hartman --- 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;