diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2010-10-18 16:43:58 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2010-10-18 16:43:58 +0100 |
commit | f114466a23ceaf058ac13b08e83725e6354bc519 (patch) | |
tree | b82fb171c6733c3627cf8f6221fae8b7f2dc038f /tools/libxc/xc_tmem.c | |
parent | 3a200f3c4be9bbbf6078ba0a6e6f1f2a543f5378 (diff) | |
download | xen-f114466a23ceaf058ac13b08e83725e6354bc519.tar.gz xen-f114466a23ceaf058ac13b08e83725e6354bc519.tar.bz2 xen-f114466a23ceaf058ac13b08e83725e6354bc519.zip |
libxc: pass an xc_interface handle to page locking functions
Not actually used here but useful to confirm that a handle is passed
down to each location where it will be required once we switch to
hypercall buffers.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xc_tmem.c')
-rw-r--r-- | tools/libxc/xc_tmem.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/libxc/xc_tmem.c b/tools/libxc/xc_tmem.c index 199cc97fd5..d2d8ca8309 100644 --- a/tools/libxc/xc_tmem.c +++ b/tools/libxc/xc_tmem.c @@ -28,7 +28,7 @@ static int do_tmem_op(xc_interface *xch, tmem_op_t *op) hypercall.op = __HYPERVISOR_tmem_op; hypercall.arg[0] = (unsigned long)op; - if (lock_pages(op, sizeof(*op)) != 0) + if (lock_pages(xch, op, sizeof(*op)) != 0) { PERROR("Could not lock memory for Xen hypercall"); return -EFAULT; @@ -39,7 +39,7 @@ static int do_tmem_op(xc_interface *xch, tmem_op_t *op) DPRINTF("tmem operation failed -- need to" " rebuild the user-space tool set?\n"); } - unlock_pages(op, sizeof(*op)); + unlock_pages(xch, op, sizeof(*op)); return ret; } @@ -69,7 +69,7 @@ int xc_tmem_control(xc_interface *xch, op.u.ctrl.oid[2] = 0; if (subop == TMEMC_LIST) { - if ((arg1 != 0) && (lock_pages(buf, arg1) != 0)) + if ((arg1 != 0) && (lock_pages(xch, buf, arg1) != 0)) { PERROR("Could not lock memory for Xen hypercall"); return -ENOMEM; @@ -85,7 +85,7 @@ int xc_tmem_control(xc_interface *xch, if (subop == TMEMC_LIST) { if (arg1 != 0) - unlock_pages(buf, arg1); + unlock_pages(xch, buf, arg1); } return rc; @@ -115,7 +115,7 @@ int xc_tmem_control_oid(xc_interface *xch, op.u.ctrl.oid[2] = oid.oid[2]; if (subop == TMEMC_LIST) { - if ((arg1 != 0) && (lock_pages(buf, arg1) != 0)) + if ((arg1 != 0) && (lock_pages(xch, buf, arg1) != 0)) { PERROR("Could not lock memory for Xen hypercall"); return -ENOMEM; @@ -131,7 +131,7 @@ int xc_tmem_control_oid(xc_interface *xch, if (subop == TMEMC_LIST) { if (arg1 != 0) - unlock_pages(buf, arg1); + unlock_pages(xch, buf, arg1); } return rc; |