Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1245564

[PATCH 2/2] KVM: x86: fix SMI to halted VCPU

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] KVM: x86: fix SMI to halted VCPU
Date 2015-10-13 12:40 +0200
Message-ID <qj59U-3SV-23@gated-at.bofh.it> (permalink)
References <qj59T-3SV-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] KVM: x86: fix deliver of SMIs to halted VCPUs Paolo Bonzini <pbonzini@redhat.com> - 2015-10-13 12:40 +0200
  [PATCH 1/2] KVM: x86: clean up kvm_arch_vcpu_runnable Paolo Bonzini <pbonzini@redhat.com> - 2015-10-13 12:40 +0200
    Re: [PATCH 1/2] KVM: x86: clean up kvm_arch_vcpu_runnable Radim Krčmář <rkrcmar@redhat.com> - 2015-10-13 17:50 +0200
  [PATCH 2/2] KVM: x86: fix SMI to halted VCPU Paolo Bonzini <pbonzini@redhat.com> - 2015-10-13 12:40 +0200
    Re: [PATCH 2/2] KVM: x86: fix SMI to halted VCPU Radim Krčmář <rkrcmar@redhat.com> - 2015-10-13 18:00 +0200
  Re: [PATCH 0/2] KVM: x86: fix deliver of SMIs to halted VCPUs Paolo Bonzini <pbonzini@redhat.com> - 2015-10-13 15:10 +0200

csiph-web