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] continue_hypercall_on_cpu() always defers

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] continue_hypercall_on_cpu() always defers execution of the continuation
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Apr 2010 21:50:17 -0700
Delivery-date: Sun, 18 Apr 2010 11:04:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271327518 -3600
# Node ID 6eda8033bb6dfdb72aa8041425b9b55daca69085
# Parent  93ac55cf3e40886c449008094f76dfaf906a505f
continue_hypercall_on_cpu() always defers execution of the continuation

...even when scheduled to run on the current physical cpu. This
ensures that locks get dropped correctly before executing the
continuation code, and also allows the original caller to determine
whether the continuation has/will execute based on c_h_o_c()'s
immediate return code.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/domain.c      |    3 ---
 xen/include/xen/domain.h |    7 ++++++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff -r 93ac55cf3e40 -r 6eda8033bb6d xen/common/domain.c
--- a/xen/common/domain.c       Thu Apr 15 09:04:45 2010 +0100
+++ b/xen/common/domain.c       Thu Apr 15 11:31:58 2010 +0100
@@ -951,9 +951,6 @@ int continue_hypercall_on_cpu(
     if ( (cpu >= NR_CPUS) || !cpu_online(cpu) )
         return -EINVAL;
 
-    if ( cpu == smp_processor_id() )
-        return func(data);
-
     info = this_cpu(continue_info);
     if ( info == NULL )
     {
diff -r 93ac55cf3e40 -r 6eda8033bb6d xen/include/xen/domain.h
--- a/xen/include/xen/domain.h  Thu Apr 15 09:04:45 2010 +0100
+++ b/xen/include/xen/domain.h  Thu Apr 15 11:31:58 2010 +0100
@@ -63,7 +63,12 @@ bool_t domctl_lock_acquire(void);
 bool_t domctl_lock_acquire(void);
 void domctl_lock_release(void);
 
-/* Continue the current hypercall via func(data) on specified cpu. */
+/*
+ * Continue the current hypercall via func(data) on specified cpu.
+ * If this function returns 0 then the function is guaranteed to run at some
+ * point in the future. If this function returns an error code then the
+ * function has not been and will not be executed.
+ */
 int continue_hypercall_on_cpu(
     unsigned int cpu, long (*func)(void *data), void *data);
 

_______________________________________________
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] continue_hypercall_on_cpu() always defers execution of the continuation, Xen patchbot-unstable <=