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

[Xen-changelog] [xen-unstable] [XEN] Fill in runstate_info when virtual address is registered,



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID c6747b81d30814a8b3fcfed45a891072df38075c
# Parent  356520dca6df8504a461228ae76d3ecd86626386
[XEN] Fill in runstate_info when virtual address is registered,
even when it is registered from the 'wrong' VCPU.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/domain.c |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -r 356520dca6df -r c6747b81d308 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Mon Oct 23 12:43:32 2006 +0100
+++ b/xen/arch/x86/domain.c     Mon Oct 23 13:10:24 2006 +0100
@@ -378,6 +378,7 @@ arch_do_vcpu_op(
     case VCPUOP_register_runstate_memory_area:
     {
         struct vcpu_register_runstate_memory_area area;
+        struct vcpu_runstate_info runstate;
 
         rc = -EFAULT;
         if ( copy_from_guest(&area, arg, 1) )
@@ -390,8 +391,15 @@ arch_do_vcpu_op(
         v->runstate_guest = area.addr.v;
 
         if ( v == current )
+        {
             __copy_to_user(v->runstate_guest, &v->runstate,
                            sizeof(v->runstate));
+        }
+        else
+        {
+            vcpu_runstate_get(v, &runstate);
+            __copy_to_user(v->runstate_guest, &runstate, sizeof(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®.