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 | 79647c5bc9c62feeed8a1e50e7c73001ae10b23d (patch) | |
tree | a3132a6db9d4cea23c2936efd23e4078057d6341 /tools/libxc/xc_private.h | |
parent | 70d20aed9a6406842d3d957583fbe15c60fd84ec (diff) | |
download | xen-79647c5bc9c62feeed8a1e50e7c73001ae10b23d.tar.gz xen-79647c5bc9c62feeed8a1e50e7c73001ae10b23d.tar.bz2 xen-79647c5bc9c62feeed8a1e50e7c73001ae10b23d.zip |
libxc: convert domctl interfaces over to hypercall buffers
(defer save/restore and shadow related interfaces til a later patch)
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 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index a9394f76d4..aa36d1157b 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -211,17 +211,18 @@ static inline int do_domctl(xc_interface *xch, struct xen_domctl *domctl) { int ret = -1; DECLARE_HYPERCALL; + DECLARE_HYPERCALL_BOUNCE(domctl, sizeof(*domctl), XC_HYPERCALL_BUFFER_BOUNCE_BOTH); - if ( hcall_buf_prep(xch, (void **)&domctl, sizeof(*domctl)) != 0 ) + domctl->interface_version = XEN_DOMCTL_INTERFACE_VERSION; + + if ( xc_hypercall_bounce_pre(xch, domctl) ) { - PERROR("Could not lock memory for Xen hypercall"); + PERROR("Could not bounce buffer for domctl hypercall"); goto out1; } - domctl->interface_version = XEN_DOMCTL_INTERFACE_VERSION; - hypercall.op = __HYPERVISOR_domctl; - hypercall.arg[0] = (unsigned long)domctl; + hypercall.arg[0] = HYPERCALL_BUFFER_AS_ARG(domctl); if ( (ret = do_xen_hypercall(xch, &hypercall)) < 0 ) { @@ -230,8 +231,7 @@ static inline int do_domctl(xc_interface *xch, struct xen_domctl *domctl) " rebuild the user-space tool set?\n"); } - hcall_buf_release(xch, (void **)&domctl, sizeof(*domctl)); - + xc_hypercall_bounce_post(xch, domctl); out1: return ret; } |