WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] xen/evtchn: clear secondary CPUs' cpu

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xen/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Nov 2010 03:50:04 -0800
Delivery-date: Tue, 16 Nov 2010 03:50:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1289907079 0
# Node ID 7de7453dee36455d418f8bb8092a329c662b126a
# Parent  f7dde31efff3be20157ea08bb15126aee7a8d4c2
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 <jbeulich@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
 drivers/xen/core/evtchn.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r f7dde31efff3 -r 7de7453dee36 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c Mon Nov 15 09:32:57 2010 +0000
+++ b/drivers/xen/core/evtchn.c Tue Nov 16 11:31:19 2010 +0000
@@ -161,7 +161,10 @@ 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 == 0) ? ~0 : 0,
+                      sizeof(cpu_evtchn_mask[i]));
 }
 
 static inline unsigned int cpu_from_evtchn(unsigned int evtchn)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xen/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore, Xen patchbot-linux-2.6.18-xen <=