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

[Xen-changelog] [xen-unstable] [XEN] VCPU operation register_runstate should work even when



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID b8e8b6aad8c8c38d8277c5188e548c64049299f0
# Parent  96b1479305ce2c324e91aa16b9592be54d9c1f4b
[XEN] VCPU operation register_runstate should work even when
called from non-local VCPU. Necessary as Linux always calls
this operation from VCPU0 during secondary-VCPU bringup.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/domain.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff -r 96b1479305ce -r b8e8b6aad8c8 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Fri Jun 09 16:49:49 2006 +0100
+++ b/xen/arch/x86/domain.c     Fri Jun 09 17:05:09 2006 +0100
@@ -377,10 +377,6 @@ arch_do_vcpu_op(
     {
         struct vcpu_register_runstate_memory_area area;
 
-        rc = -EINVAL;
-        if ( v != current )
-            break;
-
         rc = -EFAULT;
         if ( copy_from_guest(&area, arg, 1) )
             break;
@@ -390,7 +386,10 @@ arch_do_vcpu_op(
 
         rc = 0;
         v->runstate_guest = area.addr.v;
-        __copy_to_user(v->runstate_guest, &v->runstate, sizeof(v->runstate));
+
+        if ( v == current )
+            __copy_to_user(v->runstate_guest, &v->runstate,
+                           sizeof(v->runstate));
 
         break;
     }

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