From: Keir Fraser Date: Tue, 16 Nov 2010 11:31:19 +0000 (+0000) Subject: xen/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=631ffd94a0b7e522071c5c66335b40d179a728b7;p=legacy%2Flinux-2.6.18-xen.git xen/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 Signed-off-by: Keir Fraser --- diff --git a/drivers/xen/core/evtchn.c b/drivers/xen/core/evtchn.c index 2024c084..b15b94e1 100644 --- a/drivers/xen/core/evtchn.c +++ b/drivers/xen/core/evtchn.c @@ -161,7 +161,10 @@ static void init_evtchn_cpu_bindings(void) 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 == 0) ? ~0 : 0, + sizeof(cpu_evtchn_mask[i])); } static inline unsigned int cpu_from_evtchn(unsigned int evtchn)