debuggers.hg

changeset 22814:f8d801e5573e

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>
author Daniel De Graaf <dgdegra@tycho.nsa.gov>
date Mon Jan 17 17:28:30 2011 +0000 (2011-01-17)
parents 7f6d529b5f4f
children c281e9c58146
files tools/libxc/xc_gnttab.c tools/libxc/xc_linux_osdep.c
line diff
     1.1 --- a/tools/libxc/xc_gnttab.c	Mon Jan 17 17:24:21 2011 +0000
     1.2 +++ b/tools/libxc/xc_gnttab.c	Mon Jan 17 17:28:30 2011 +0000
     1.3 @@ -184,6 +184,8 @@ int xc_gnttab_munmap(xc_gnttab *xcg,
     1.4  
     1.5  int xc_gnttab_set_max_grants(xc_gnttab *xcg, uint32_t count)
     1.6  {
     1.7 +	if (!xcg->ops->u.gnttab.set_max_grants)
     1.8 +		return 0;
     1.9  	return xcg->ops->u.gnttab.set_max_grants(xcg, xcg->ops_handle, count);
    1.10  }
    1.11  
     2.1 --- a/tools/libxc/xc_linux_osdep.c	Mon Jan 17 17:24:21 2011 +0000
     2.2 +++ b/tools/libxc/xc_linux_osdep.c	Mon Jan 17 17:28:30 2011 +0000
     2.3 @@ -627,19 +627,6 @@ static int linux_gnttab_munmap(xc_gnttab
     2.4      return 0;
     2.5  }
     2.6  
     2.7 -static int linux_gnttab_set_max_grants(xc_gnttab *xcg, xc_osdep_handle h, uint32_t count)
     2.8 -{
     2.9 -    int fd = (int)h;
    2.10 -    struct ioctl_gntdev_set_max_grants set_max;
    2.11 -    int rc;
    2.12 -
    2.13 -    set_max.count = count;
    2.14 -    if ( (rc = ioctl(fd, IOCTL_GNTDEV_SET_MAX_GRANTS, &set_max)) )
    2.15 -        return rc;
    2.16 -
    2.17 -    return 0;
    2.18 -}
    2.19 -
    2.20  static struct xc_osdep_ops linux_gnttab_ops = {
    2.21      .open = &linux_gnttab_open,
    2.22      .close = &linux_gnttab_close,
    2.23 @@ -649,7 +636,6 @@ static struct xc_osdep_ops linux_gnttab_
    2.24          .map_grant_refs = &linux_gnttab_map_grant_refs,
    2.25          .map_domain_grant_refs = &linux_gnttab_map_domain_grant_refs,
    2.26          .munmap = &linux_gnttab_munmap,
    2.27 -        .set_max_grants = &linux_gnttab_set_max_grants,
    2.28      },
    2.29  };
    2.30