diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2010-10-22 15:14:51 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2010-10-22 15:14:51 +0100 |
commit | a1549a5312c76bef403254bf5d3578e24297ef32 (patch) | |
tree | 309fbcdd814c84a73a0c4a7d33939ef1d91c88e9 /tools/libxc/xc_private.h | |
parent | 97feb4c2200f21b5ff9d3dd36cefbab691c809a9 (diff) | |
download | xen-a1549a5312c76bef403254bf5d3578e24297ef32.tar.gz xen-a1549a5312c76bef403254bf5d3578e24297ef32.tar.bz2 xen-a1549a5312c76bef403254bf5d3578e24297ef32.zip |
libxc: convert physdevop interface over to hypercall buffers
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxc/xc_private.h')
-rw-r--r-- | tools/libxc/xc_private.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index f360b14022..c56348e4e6 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -181,18 +181,18 @@ static inline int do_xen_version(xc_interface *xch, int cmd, xc_hypercall_buffer static inline int do_physdev_op(xc_interface *xch, int cmd, void *op, size_t len) { int ret = -1; - DECLARE_HYPERCALL; + DECLARE_HYPERCALL_BOUNCE(op, len, XC_HYPERCALL_BUFFER_BOUNCE_BOTH); - if ( hcall_buf_prep(xch, &op, len) != 0 ) + if ( xc_hypercall_bounce_pre(xch, op) ) { - PERROR("Could not lock memory for Xen hypercall"); + PERROR("Could not bounce memory for physdev hypercall"); goto out1; } hypercall.op = __HYPERVISOR_physdev_op; hypercall.arg[0] = (unsigned long) cmd; - hypercall.arg[1] = (unsigned long) op; + hypercall.arg[1] = HYPERCALL_BUFFER_AS_ARG(op); if ( (ret = do_xen_hypercall(xch, &hypercall)) < 0 ) { @@ -201,8 +201,7 @@ static inline int do_physdev_op(xc_interface *xch, int cmd, void *op, size_t len " rebuild the user-space tool set?\n"); } - hcall_buf_release(xch, &op, len); - + xc_hypercall_bounce_post(xch, op); out1: return ret; } |