aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_linux.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-03-18 15:00:33 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-03-18 15:00:33 +0000
commit86d8fe5e6a886883cbbf15fb8c5d7399fd50bba6 (patch)
tree4ed5324001904721d4d5e084cd17c7baad9f2572 /tools/libxc/xc_linux.c
parent0de39e40277b50f7bca390602216e19a809cc45c (diff)
downloadxen-86d8fe5e6a886883cbbf15fb8c5d7399fd50bba6.tar.gz
xen-86d8fe5e6a886883cbbf15fb8c5d7399fd50bba6.tar.bz2
xen-86d8fe5e6a886883cbbf15fb8c5d7399fd50bba6.zip
libxc: Variable-size gntdev support
This patch adds the ability to set the number of slots that may be used for mapping grant references, using the gntdev user-space grant reference mapping driver. Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
Diffstat (limited to 'tools/libxc/xc_linux.c')
-rw-r--r--tools/libxc/xc_linux.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/libxc/xc_linux.c b/tools/libxc/xc_linux.c
index 32aaab819b..b6f9b82a52 100644
--- a/tools/libxc/xc_linux.c
+++ b/tools/libxc/xc_linux.c
@@ -4,7 +4,7 @@
* Use is subject to license terms.
*
* xc_gnttab functions:
- * Copyright (c) 2007, D G Murray <Derek.Murray@cl.cam.ac.uk>
+ * Copyright (c) 2007-2008, D G Murray <Derek.Murray@cl.cam.ac.uk>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -505,6 +505,19 @@ int xc_gnttab_munmap(int xcg_handle,
return 0;
}
+int xc_gnttab_set_max_grants(int xcg_handle,
+ uint32_t count)
+{
+ struct ioctl_gntdev_set_max_grants set_max;
+ int rc;
+
+ set_max.count = count;
+ if ( (rc = ioctl(xcg_handle, IOCTL_GNTDEV_SET_MAX_GRANTS, &set_max)) )
+ return rc;
+
+ return 0;
+}
+
/*
* Local variables:
* mode: C