> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of
> Juergen Gross
> Sent: 06 September 2017 13:47
> To: xen-devel@lists.xen.org
> Cc: Juergen Gross <jgr...@suse.com>; sstabell...@kernel.org; Wei Liu
> <wei.l...@citrix.com>; George Dunlap <george.dun...@citrix.com>;
> Andrew Cooper <andrew.coop...@citrix.com>; Ian Jackson
> <ian.jack...@citrix.com>; Tim (Xen.org) <t...@xen.org>;
> julien.gr...@arm.com; jbeul...@suse.com
> Subject: [Xen-devel] [PATCH v3 7/8] libxc: add libxc support for setting grant
> table resource limits
> 
> Add a new libxc function xc_domain_set_gnttbl_limits() setting the
> limits for the maximum numbers of grant table frames and maptrack
> frames of a domain.
> 
> Signed-off-by: Juergen Gross <jgr...@suse.com>

Reviewed-by: Paul Durrant <paul.durr...@citrix.com>

> ---
>  tools/libxc/include/xenctrl.h | 14 ++++++++++++++
>  tools/libxc/xc_domain.c       | 13 +++++++++++++
>  2 files changed, 27 insertions(+)
> 
> diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
> index 43151cb415..39b58cf5b7 100644
> --- a/tools/libxc/include/xenctrl.h
> +++ b/tools/libxc/include/xenctrl.h
> @@ -1064,6 +1064,20 @@ int xc_domain_set_virq_handler(xc_interface
> *xch, uint32_t domid, int virq);
>  int xc_domain_set_max_evtchn(xc_interface *xch, uint32_t domid,
>                               uint32_t max_port);
> 
> +/**
> + * Set the maximum number of grant frames and/or maptrack frames a
> domain
> + * can have. Can only be used at domain setup time. A zero value means
> + * no change.
> + *
> + * @param xch a handle to an open hypervisor interface
> + * @param domid the domain id
> + * @param grant_frames max. number of grant frames
> + * @param maptrack_frames max. number of maptrack frames
> + */
> +int xc_domain_set_gnttab_limits(xc_interface *xch, uint32_t domid,
> +                                uint32_t grant_frames,
> +                                uint32_t maptrack_frames);
> +
>  /*
>   * CPUPOOL MANAGEMENT FUNCTIONS
>   */
> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
> index 3bab4e8bab..e59665ff6e 100644
> --- a/tools/libxc/xc_domain.c
> +++ b/tools/libxc/xc_domain.c
> @@ -2268,6 +2268,19 @@ int xc_domain_set_max_evtchn(xc_interface
> *xch, uint32_t domid,
>      return do_domctl(xch, &domctl);
>  }
> 
> +int xc_domain_set_gnttab_limits(xc_interface *xch, uint32_t domid,
> +                                uint32_t grant_frames,
> +                                uint32_t maptrack_frames)
> +{
> +    DECLARE_DOMCTL;
> +
> +    domctl.cmd = XEN_DOMCTL_set_gnttab_limits;
> +    domctl.domain = domid;
> +    domctl.u.set_gnttab_limits.grant_frames = grant_frames;
> +    domctl.u.set_gnttab_limits.maptrack_frames = maptrack_frames;
> +    return do_domctl(xch, &domctl);
> +}
> +
>  /* Plumbing Xen with vNUMA topology */
>  int xc_domain_setvnuma(xc_interface *xch,
>                         uint32_t domid,
> --
> 2.12.3
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to