> 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 <[email protected]>
>> Fixes: 33e4c68656a2e461b296ce714ec322978de85412
>> Cc: [email protected] # 2.6.32+
>> Signed-off-by: Paolo Bonzini <[email protected]>
>> ---
>>      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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to