From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH stable] KVM: x86: Fix lost interrupt on irr_pending race Date: Wed, 29 Apr 2015 18:45:37 +0200 Message-ID: <55410AB1.4000300@redhat.com> References: <1429602745-29882-1-git-send-email-pbonzini@redhat.com> <55360EA9.2030806@redhat.com> <000001d081cf$dd148fb0$973daf10$@astim.si> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: lists2009@fnarfbargle.com, "'Nadav Amit'" To: Saso Slavicic , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53454 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753602AbbD2Qpq (ORCPT ); Wed, 29 Apr 2015 12:45:46 -0400 In-Reply-To: <000001d081cf$dd148fb0$973daf10$@astim.si> Sender: kvm-owner@vger.kernel.org List-ID: On 28/04/2015 18:24, Saso Slavicic wrote: > This will probably end up in RHEL6 sooner or later (but probably not before > 6.7)? > As I like to experiment a bit, would this patch do for -2.6.32-504.12.2.el6 > kernel? The code in that function is somewhat different... > > --- a/arch/x86/kvm/lapic.c > +++ b/arch/x86/kvm/lapic.c > @@ -230,8 +230,13 @@ > > static inline int apic_test_and_set_irr(int vec, struct kvm_lapic *apic) > { > + int ret = apic_test_and_set_vector(vec, apic->regs + APIC_IRR); > + /* > + * irr_pending must be true if any interrupt is pending; set it > after > + * APIC_IRR to avoid race with apic_clear_irr > + */ > apic->irr_pending = true; > - return apic_test_and_set_vector(vec, apic->regs + APIC_IRR); > + return ret; > } > > static inline int apic_search_irr(struct kvm_lapic *apic) > > > Regards, Yes, this exact same patch is brewing in the RHEL6.7 internal trees... See https://bugzilla.redhat.com/show_bug.cgi?id=1213741 Paolo