Hi,
xenperf became not to work due to xencomm.
This patch fixes it.
Thanks,
Kouya
Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
diff -r cf05aabe6e65 linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c
--- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c Wed Oct 25 15:29:00
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c Thu Oct 26 11:13:33
2006 +0900
@@ -120,25 +120,50 @@ 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,
+
+ 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),
- kern_op.u.perfc_op.nr_vals *
- sizeof(xen_sysctl_perfc_desc_t),
+ 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;
+ }
case XEN_SYSCTL_getdomaininfolist:
ret = xencomm_create(
xen_guest_handle(kern_op.u.getdomaininfolist.buffer),
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|