diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2011-01-17 17:28:30 +0000 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2011-01-17 17:28:30 +0000 |
commit | 618a3fb38bcd860320faf8dbbe1b85c79fb34cb9 (patch) | |
tree | fba32ebc7899a528508e7a0f2c35c0918d766df4 | |
parent | 38da12ffee01c2d88ba6b6441142e58e59212af9 (diff) | |
download | xen-618a3fb38bcd860320faf8dbbe1b85c79fb34cb9.tar.gz xen-618a3fb38bcd860320faf8dbbe1b85c79fb34cb9.tar.bz2 xen-618a3fb38bcd860320faf8dbbe1b85c79fb34cb9.zip |
libxc: Remove set_max_grants in linux
The maximum number of grants is now constrained domain-wide in linux,
so set_max_grants should be a noop there. Previously, this constraint
was per-file-description.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r-- | tools/libxc/xc_gnttab.c | 2 | ||||
-rw-r--r-- | tools/libxc/xc_linux_osdep.c | 14 |
2 files changed, 2 insertions, 14 deletions
diff --git a/tools/libxc/xc_gnttab.c b/tools/libxc/xc_gnttab.c index ae152fd2a5..4f55fcef15 100644 --- a/tools/libxc/xc_gnttab.c +++ b/tools/libxc/xc_gnttab.c @@ -184,6 +184,8 @@ int xc_gnttab_munmap(xc_gnttab *xcg, int xc_gnttab_set_max_grants(xc_gnttab *xcg, uint32_t count) { + if (!xcg->ops->u.gnttab.set_max_grants) + return 0; return xcg->ops->u.gnttab.set_max_grants(xcg, xcg->ops_handle, count); } diff --git a/tools/libxc/xc_linux_osdep.c b/tools/libxc/xc_linux_osdep.c index fd2d8df35f..377c93867a 100644 --- a/tools/libxc/xc_linux_osdep.c +++ b/tools/libxc/xc_linux_osdep.c @@ -627,19 +627,6 @@ static int linux_gnttab_munmap(xc_gnttab *xcg, xc_osdep_handle h, return 0; } -static int linux_gnttab_set_max_grants(xc_gnttab *xcg, xc_osdep_handle h, uint32_t count) -{ - int fd = (int)h; - struct ioctl_gntdev_set_max_grants set_max; - int rc; - - set_max.count = count; - if ( (rc = ioctl(fd, IOCTL_GNTDEV_SET_MAX_GRANTS, &set_max)) ) - return rc; - - return 0; -} - static struct xc_osdep_ops linux_gnttab_ops = { .open = &linux_gnttab_open, .close = &linux_gnttab_close, @@ -649,7 +636,6 @@ static struct xc_osdep_ops linux_gnttab_ops = { .map_grant_refs = &linux_gnttab_map_grant_refs, .map_domain_grant_refs = &linux_gnttab_map_domain_grant_refs, .munmap = &linux_gnttab_munmap, - .set_max_grants = &linux_gnttab_set_max_grants, }, }; |