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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] x86: Disable IRQs and do WBINVD first in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Disable IRQs and do WBINVD first in play_dead().
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 03 Mar 2011 02:40:09 +0000
Delivery-date: Wed, 02 Mar 2011 18:40:15 -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 1299061403 0
# Node ID 666006a3a4ad3e4015fa0610aae6ebda3d271523
# Parent  bde351b18fd0fce23e6d4ae24627ed15a9b7c768
x86: Disable IRQs and do WBINVD first in play_dead().

When we advertise we are dead via cpu_exit_clear(), it is no longer
safe to handle interrupts as our per-cpu vars can go away.

In future, we may want to think about NMI handling in this scenario

Signed-off-by: Keir Fraser <keir@xxxxxxx>

diff -r bde351b18fd0 -r 666006a3a4ad xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Wed Mar 02 10:01:55 2011 +0000
+++ b/xen/arch/x86/domain.c     Wed Mar 02 10:23:23 2011 +0000
@@ -99,19 +99,20 @@
 static void play_dead(void)
+    local_irq_disable();
+    wbinvd();
      * NOTE: After cpu_exit_clear, per-cpu variables are no longer accessible,
      * as they may be freed at any time. In this case, heap corruption or
      * #PF can occur (when heap debugging is enabled). For example, even
      * printk() can involve tasklet scheduling, which touches per-cpu vars.
-     * Consider very carefully when adding code to this path. Most hypervisor
+     * Consider very carefully when adding code to *dead_idle. Most hypervisor
      * subsystems are unsafe to call.
-    mb();
-    local_irq_disable();
-    wbinvd();

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Disable IRQs and do WBINVD first in play_dead()., Xen patchbot-unstable <=