# HG changeset patch
# User Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
# Date 1295285310 0
# Node ID f8d801e5573ee7bb4071ca3611f85b2f78036de6
# Parent 7f6d529b5f4fdedb5e8636114d1364271f360923
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@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
tools/libxc/xc_gnttab.c | 2 ++
tools/libxc/xc_linux_osdep.c | 14 --------------
2 files changed, 2 insertions(+), 14 deletions(-)
diff -r 7f6d529b5f4f -r f8d801e5573e tools/libxc/xc_gnttab.c
--- a/tools/libxc/xc_gnttab.c Mon Jan 17 17:24:21 2011 +0000
+++ b/tools/libxc/xc_gnttab.c Mon Jan 17 17:28:30 2011 +0000
@@ -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 -r 7f6d529b5f4f -r f8d801e5573e tools/libxc/xc_linux_osdep.c
--- a/tools/libxc/xc_linux_osdep.c Mon Jan 17 17:24:21 2011 +0000
+++ b/tools/libxc/xc_linux_osdep.c Mon Jan 17 17:28:30 2011 +0000
@@ -627,19 +627,6 @@ static int linux_gnttab_munmap(xc_gnttab
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_
.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,
},
};
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|