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

[Xen-changelog] [xen-unstable] Fix hypercall migration. schedule_tail() is not required



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1184920707 -3600
# Node ID bb5c23bbc7b7e233dc0db3834a73ee3e0f00d545
# Parent  9c3a8ca0bf34c1cf779e9c137de1309bcc13e727
Fix hypercall migration. schedule_tail() is not required
after set affinity, or else continue stub runs on current
cpu immediately before migrating is checked when switching
out.

Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/domain.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -r 9c3a8ca0bf34 -r bb5c23bbc7b7 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Thu Jul 19 17:18:20 2007 +0100
+++ b/xen/arch/x86/domain.c     Fri Jul 20 09:38:27 2007 +0100
@@ -1394,6 +1394,9 @@ int continue_hypercall_on_cpu(int cpu, l
     struct migrate_info *info;
     cpumask_t mask = cpumask_of_cpu(cpu);
 
+    if ( cpu == smp_processor_id() )
+        return func(data);
+
     info = xmalloc(struct migrate_info);
     if ( info == NULL )
         return -ENOMEM;
@@ -1407,8 +1410,9 @@ int continue_hypercall_on_cpu(int cpu, l
     v->arch.continue_info = info;
 
     vcpu_set_affinity(v, &mask);
-    schedule_tail(v);
-
+
+    /* Dummy return value will be overwritten by new schedule_tail. */
+    BUG_ON(!test_bit(SCHEDULE_SOFTIRQ, &softirq_pending(smp_processor_id())));
     return 0;
 }
 

_______________________________________________
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®.