WARNING - OLD ARCHIVES

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

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix hypercall migration. schedule_tail() is not required
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Jul 2007 03:15:14 -0700
Delivery-date: Fri, 27 Jul 2007 03:13:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix hypercall migration. schedule_tail() is not required, Xen patchbot-unstable <=