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

[Xen-changelog] [xen-unstable] Merge



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1170267348 0
# Node ID b998ae45c076eb6b32a48ec0e7c49d9a03ec846f
# Parent  6db6b5df4f6f1ebe94738c3624d19e6b4053bcf3
# Parent  82062701b19916e0a6313573fe1f0beaead1bb58
Merge
---
 xen/common/perfc.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff -r 6db6b5df4f6f -r b998ae45c076 xen/common/perfc.c
--- a/xen/common/perfc.c        Wed Jan 31 18:15:00 2007 +0000
+++ b/xen/common/perfc.c        Wed Jan 31 18:15:48 2007 +0000
@@ -136,8 +136,8 @@ static xen_sysctl_perfc_val_t *perfc_val
 static xen_sysctl_perfc_val_t *perfc_vals;
 static int               perfc_nbr_vals;
 static int               perfc_init = 0;
-static int perfc_copy_info(XEN_GUEST_HANDLE_64(xen_sysctl_perfc_desc_t) desc,
-                           XEN_GUEST_HANDLE_64(xen_sysctl_perfc_val_t) val)
+static int perfc_copy_info(XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t) desc,
+                           XEN_GUEST_HANDLE(xen_sysctl_perfc_val_t) val)
 {
     unsigned int i, j;
     unsigned int v = 0;
@@ -217,20 +217,29 @@ int perfc_control(xen_sysctl_perfc_op_t 
 int perfc_control(xen_sysctl_perfc_op_t *pc)
 {
     static DEFINE_SPINLOCK(lock);
+    XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t) desc;
+    XEN_GUEST_HANDLE(xen_sysctl_perfc_val_t) val;
     int rc;
 
+    /*
+     * 64 bit guest handles cannot be passed as parameters to
+     * functions so cast to a regular guest handle.
+     */
+    desc = guest_handle_cast(pc->desc, xen_sysctl_perfc_desc_t);
+    val = guest_handle_cast(pc->val, xen_sysctl_perfc_val_t);
+
     spin_lock(&lock);
 
     switch ( pc->cmd )
     {
     case XEN_SYSCTL_PERFCOP_reset:
-        perfc_copy_info(pc->desc, pc->val);
+        perfc_copy_info(desc, val);
         perfc_reset(0);
         rc = 0;
         break;
 
     case XEN_SYSCTL_PERFCOP_query:
-        perfc_copy_info(pc->desc, pc->val);
+        perfc_copy_info(desc, val);
         rc = 0;
         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®.