[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] linux-2.6.18/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore



To bind all event channels to CPU#0, it is not sufficient to set all of
its cpu_evtchn_mask[] bits; all other CPUs also need to get their bits
cleared. Otherwise, evtchn_do_upcall() will start handling interrupts
on CPUs they're not intended to run on, which can be particularly bad
for per-CPU ones.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- a/drivers/xen/core/evtchn.c
+++ b/drivers/xen/core/evtchn.c
@@ -161,7 +161,8 @@ static void init_evtchn_cpu_bindings(voi
                set_native_irq_info(i, cpumask_of_cpu(0));
 
        memset(cpu_evtchn, 0, sizeof(cpu_evtchn));
-       memset(cpu_evtchn_mask[0], ~0, sizeof(cpu_evtchn_mask[0]));
+       for_each_possible_cpu(i)
+               memset(cpu_evtchn_mask[i], -!i, sizeof(cpu_evtchn_mask[i]));
 }
 
 static inline unsigned int cpu_from_evtchn(unsigned int evtchn)



Attachment: xen-evtchn-cpu-clear.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.