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 | 4513025a87902aa4469b15e8097beb7590da7b78 (patch) | |
tree | 6639b374163076d128b6a5e54a124404b45e8b04 /tools/libxc/xc_domain.c | |
parent | 231c3160913a957cb9aeb693a7966ac3f8ecc780 (diff) | |
download | xen-4513025a87902aa4469b15e8097beb7590da7b78.tar.gz xen-4513025a87902aa4469b15e8097beb7590da7b78.tar.bz2 xen-4513025a87902aa4469b15e8097beb7590da7b78.zip |
libxc: convert sysctl interfaces 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_domain.c')
-rw-r--r-- | tools/libxc/xc_domain.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 54ed939bbc..aada28bbde 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -245,21 +245,22 @@ int xc_domain_getinfolist(xc_interface *xch, { int ret = 0; DECLARE_SYSCTL; + DECLARE_HYPERCALL_BOUNCE(info, max_domains*sizeof(*info), XC_HYPERCALL_BUFFER_BOUNCE_OUT); - if ( lock_pages(xch, info, max_domains*sizeof(xc_domaininfo_t)) != 0 ) + if ( xc_hypercall_bounce_pre(xch, info) ) return -1; sysctl.cmd = XEN_SYSCTL_getdomaininfolist; sysctl.u.getdomaininfolist.first_domain = first_domain; sysctl.u.getdomaininfolist.max_domains = max_domains; - set_xen_guest_handle(sysctl.u.getdomaininfolist.buffer, info); + xc_set_xen_guest_handle(sysctl.u.getdomaininfolist.buffer, info); if ( xc_sysctl(xch, &sysctl) < 0 ) ret = -1; else ret = sysctl.u.getdomaininfolist.num_domains; - unlock_pages(xch, info, max_domains*sizeof(xc_domaininfo_t)); + xc_hypercall_bounce_post(xch, info); return ret; } |