From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: rkrcmar@redhat.com, lersek@redhat.com, stable@vger.kernel.org
Subject: [PATCH 2/2] KVM: x86: fix SMI to halted VCPU
Date: Tue, 13 Oct 2015 12:34:08 +0200 [thread overview]
Message-ID: <1444732448-9112-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1444732448-9112-1-git-send-email-pbonzini@redhat.com>
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>
---
arch/x86/kvm/x86.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index ad82420761dd..7b481470602a 100644
--- a/arch/x86/kvm/x86.c
+++ b/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))
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;
--
1.8.3.1
next prev parent reply other threads:[~2015-10-13 10:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 10:34 [PATCH 0/2] KVM: x86: fix deliver of SMIs to halted VCPUs Paolo Bonzini
2015-10-13 10:34 ` [PATCH 1/2] KVM: x86: clean up kvm_arch_vcpu_runnable Paolo Bonzini
2015-10-13 15:45 ` Radim Krčmář
2015-10-13 10:34 ` Paolo Bonzini [this message]
2015-10-13 15:55 ` [PATCH 2/2] KVM: x86: fix SMI to halted VCPU Radim Krčmář
2015-10-13 12:59 ` [PATCH 0/2] KVM: x86: fix deliver of SMIs to halted VCPUs Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444732448-9112-3-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lersek@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@redhat.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®