[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEN] Fix perfc after 13756:56377f5ce588
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxxxxx> # Date 1170266280 0 # Node ID 82062701b19916e0a6313573fe1f0beaead1bb58 # Parent 5d09e6098f93da0f4cd96c21b6ab0230a38e5048 [XEN] Fix perfc after 13756:56377f5ce588 64 bit guest handles can no longer be passed as parameters to functions. Extract such parameters into a regular guest handle first. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx> --- xen/common/perfc.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff -r 5d09e6098f93 -r 82062701b199 xen/common/perfc.c --- a/xen/common/perfc.c Wed Jan 31 17:22:17 2007 +0000 +++ b/xen/common/perfc.c Wed Jan 31 17:58:00 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |