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

[Xen-changelog] [xen-unstable] Synchronise lazy execstate before calling tasklet handlers.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271695700 -3600
# Node ID 5175e5e5eb548973481611404a4ef0756a47a064
# Parent  0be8bd195318744e2181235ae31d14c9235cc467
Synchronise lazy execstate before calling tasklet handlers.

This ensures we are properly running on idle-vcpu state, which certain
things (e.g., use of vmx_vmcs_{enter,exit}) rely on. It also means we
don't need to do the same thing in the stopmachine_run handler.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/stop_machine.c |    2 --
 xen/common/tasklet.c      |    1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff -r 0be8bd195318 -r 5175e5e5eb54 xen/common/stop_machine.c
--- a/xen/common/stop_machine.c Mon Apr 19 17:20:43 2010 +0100
+++ b/xen/common/stop_machine.c Mon Apr 19 17:48:20 2010 +0100
@@ -98,7 +98,6 @@ int stop_machine_run(int (*fn)(void *), 
     for_each_cpu_mask ( i, allbutself )
         tasklet_schedule_on_cpu(&per_cpu(stopmachine_tasklet, i), i);
 
-    sync_local_execstate();
     stopmachine_set_state(STOPMACHINE_PREPARE);
 
     local_irq_disable();
@@ -121,7 +120,6 @@ static void stopmachine_action(unsigned 
 {
     enum stopmachine_state state = STOPMACHINE_START;
 
-    sync_local_execstate();
     smp_mb();
 
     while ( state != STOPMACHINE_EXIT )
diff -r 0be8bd195318 -r 5175e5e5eb54 xen/common/tasklet.c
--- a/xen/common/tasklet.c      Mon Apr 19 17:20:43 2010 +0100
+++ b/xen/common/tasklet.c      Mon Apr 19 17:48:20 2010 +0100
@@ -76,6 +76,7 @@ void do_tasklet(void)
     t->is_running = 1;
 
     spin_unlock_irq(&tasklet_lock);
+    sync_local_execstate();
     t->func(t->data);
     spin_lock_irq(&tasklet_lock);
 

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


 


Rackspace

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