]> xenbits.xensource.com Git - xen.git/commitdiff
Simplify continue_hypercall_on_cpu() now that it runs in vcpu context.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 19 Apr 2010 10:07:14 +0000 (11:07 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 19 Apr 2010 10:07:14 +0000 (11:07 +0100)
We do not need to take so much care over putting the original vcpu to
sleep, as it will not be spinning on progress of the idle vcpu.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/common/domain.c

index f67445c77e5fa6b5cafa5e6e933fa99ce6a6480c..c1b32ab08797f9ba17b182b8b29685bd96796490 100644 (file)
@@ -919,19 +919,8 @@ static void continue_hypercall_tasklet_handler(unsigned long _info)
     struct migrate_info *info = (struct migrate_info *)_info;
     struct vcpu *v = info->vcpu;
 
-    /*
-     * Wait for vcpu to be entirely descheduled. We re-schedule ourselves
-     * meanwhile to allow other work to be done (e.g., descheduling the vcpu!).
-     */
-    BUG_ON(vcpu_runnable(v));
-    if ( v->is_running )
-    {
-        tasklet_schedule(&v->continue_hypercall_tasklet);
-        return;
-    }
-
-    /* Once descheduled, we need to gain access to its register state. */
-    sync_vcpu_execstate(v);
+    /* Wait for vcpu to sleep so that we can access its register state. */
+    vcpu_sleep_sync(v);
 
     this_cpu(continue_info) = info;
     return_reg(v) = (info->cpu == smp_processor_id())