From: "Saso Slavicic" <saso.linux@astim.si>
To: "'Paolo Bonzini'" <pbonzini@redhat.com>, <kvm@vger.kernel.org>
Cc: <lists2009@fnarfbargle.com>, "'Nadav Amit'" <namit@cs.technion.ac.il>
Subject: RE: [PATCH stable] KVM: x86: Fix lost interrupt on irr_pending race
Date: Tue, 28 Apr 2015 18:24:53 +0200 [thread overview]
Message-ID: <000001d081cf$dd148fb0$973daf10$@astim.si> (raw)
In-Reply-To: <55360EA9.2030806@redhat.com>
> From: Paolo Bonzini
> Sent: Tuesday, April 21, 2015 10:48 AM
Hi, big thanks to all involved in this and to Brad for endless reboots ;-)
>> Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
>> Fixes: 33e4c68656a2e461b296ce714ec322978de85412
>> Cc: stable@vger.kernel.org # 2.6.32+
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> The race was reported in 3.17+ by Brad Campbell and in
>> 2.6.32 by Saso Slavicic, so it qualifies for stable.
> Patch for kernels before 3.17:
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,
Saso Slavicic
next prev parent reply other threads:[~2015-04-28 16:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1429602745-29882-1-git-send-email-pbonzini@redhat.com>
2015-04-21 8:47 ` [PATCH stable] KVM: x86: Fix lost interrupt on irr_pending race Paolo Bonzini
2015-04-22 13:34 ` Luis Henriques
2015-04-22 13:47 ` Paolo Bonzini
2015-04-22 13:52 ` Luis Henriques
2015-04-28 16:24 ` Saso Slavicic [this message]
2015-04-29 16:45 ` 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='000001d081cf$dd148fb0$973daf10$@astim.si' \
--to=saso.linux@astim.si \
--cc=kvm@vger.kernel.org \
--cc=lists2009@fnarfbargle.com \
--cc=namit@cs.technion.ac.il \
--cc=pbonzini@redhat.com \
/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