[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: Disable IRQs and do WBINVD first in play_dead().
# 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 too. 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. */ cpu_exit_clear(smp_processor_id()); - mb(); - local_irq_disable(); - wbinvd(); + (*dead_idle)(); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |