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] [IA64] fix xenperf

# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 5cd95a6f84122ed9cceb3603b3ea7e604db18380
# Parent  01b257e72d5e72fb6cfbce9ea2ae75ceea76f10a
[IA64] fix xenperf

xenperf became not to work due to xencomm.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c |   54 +++++++++++++++-------
 1 files changed, 39 insertions(+), 15 deletions(-)

diff -r 01b257e72d5e -r 5cd95a6f8412 
linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c
--- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c Sun Oct 29 11:05:53 
2006 -0700
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c Sun Oct 29 11:13:30 
2006 -0700
@@ -120,25 +120,49 @@ xencomm_privcmd_sysctl(privcmd_hypercall
        case XEN_SYSCTL_sched_id:
                break;
        case XEN_SYSCTL_perfc_op:
-               ret = xencomm_create(
-                       xen_guest_handle(kern_op.u.perfc_op.desc),
-                       kern_op.u.perfc_op.nr_counters *
-                       sizeof(xen_sysctl_perfc_desc_t),
-                       &desc, GFP_KERNEL);
+       {
+               struct xencomm_handle *tmp_desc;
+               xen_sysctl_t tmp_op = {
+                       .cmd = XEN_SYSCTL_perfc_op,
+                       .interface_version = XEN_SYSCTL_INTERFACE_VERSION,
+                       .u.perfc_op = {
+                               .cmd = XEN_SYSCTL_PERFCOP_query,
+                               // .desc.p = NULL,
+                               // .val.p = NULL,
+                       },
+               };
+
+               if (xen_guest_handle(kern_op.u.perfc_op.desc) == NULL) {
+                       if (xen_guest_handle(kern_op.u.perfc_op.val) != NULL)
+                               return -EINVAL;
+                       break;
+               }
+
+               /* query the buffer size for xencomm */
+               tmp_desc = xencomm_create_inline(&tmp_op);
+               ret = xencomm_arch_hypercall_sysctl(tmp_desc);
                if (ret)
                        return ret;
-               set_xen_guest_handle(kern_op.u.perfc_op.val,
-                                    (void *)desc);
-               ret = xencomm_create(
-                       xen_guest_handle(kern_op.u.perfc_op.val),
-                       kern_op.u.perfc_op.nr_vals *
-                       sizeof(xen_sysctl_perfc_desc_t),
-                       &desc1, GFP_KERNEL);
+
+               ret = xencomm_create(xen_guest_handle(kern_op.u.perfc_op.desc),
+                                    tmp_op.u.perfc_op.nr_counters *
+                                    sizeof(xen_sysctl_perfc_desc_t),
+                                    &desc, GFP_KERNEL);
+               if (ret)
+                       return ret;
+
+               set_xen_guest_handle(kern_op.u.perfc_op.desc, (void *)desc);
+
+               ret = xencomm_create(xen_guest_handle(kern_op.u.perfc_op.val),
+                                    tmp_op.u.perfc_op.nr_vals *
+                                    sizeof(xen_sysctl_perfc_val_t),
+                                    &desc1, GFP_KERNEL);
                if (ret)
                        xencomm_free(desc);
-               set_xen_guest_handle(kern_op.u.perfc_op.val,
-                                    (void *)desc1);
-               break;
+
+               set_xen_guest_handle(kern_op.u.perfc_op.val, (void *)desc1);
+               break;
+       }
        case XEN_SYSCTL_getdomaininfolist:
                ret = xencomm_create(
                        xen_guest_handle(kern_op.u.getdomaininfolist.buffer),

_______________________________________________
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] [IA64] fix xenperf, Xen patchbot-unstable <=