[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 22 of 24] libxc: convert mca interface over to hypercall buffers
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1283779691 -3600 # Node ID 649c4386d5904838f801d30e908b0f3bb1387d2c # Parent 413c6e963a87945e05a8fc1eb761c1e976445d9c libxc: convert mca interface over to hypercall buffers Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> diff -r 413c6e963a87 -r 649c4386d590 tools/libxc/xc_misc.c --- a/tools/libxc/xc_misc.c Mon Sep 06 14:28:11 2010 +0100 +++ b/tools/libxc/xc_misc.c Mon Sep 06 14:28:11 2010 +0100 @@ -153,18 +153,19 @@ int xc_mca_op(xc_interface *xch, struct { int ret = 0; DECLARE_HYPERCALL; + DECLARE_HYPERCALL_BOUNCE(mc, sizeof(*mc), XC_HYPERCALL_BUFFER_BOUNCE_BOTH); - mc->interface_version = XEN_MCA_INTERFACE_VERSION; - if ( lock_pages(xch, mc, sizeof(*mc)) ) + if ( xc_hypercall_bounce_pre(xch, mc) ) { PERROR("Could not lock xen_mc memory"); - return -EINVAL; + return -1; } + mc->interface_version = XEN_MCA_INTERFACE_VERSION; hypercall.op = __HYPERVISOR_mca; - hypercall.arg[0] = (unsigned long)mc; + hypercall.arg[0] = HYPERCALL_BUFFER_AS_ARG(mc); ret = do_xen_hypercall(xch, &hypercall); - unlock_pages(xch, mc, sizeof(*mc)); + xc_hypercall_bounce_post(xch, mc); return ret; } #endif _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |