[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 7/8] libxc: add libxc support for setting grant table resource limits



> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@xxxxxxxxxxxxx] On Behalf Of
> Juergen Gross
> Sent: 06 September 2017 13:47
> To: xen-devel@xxxxxxxxxxxxx
> Cc: Juergen Gross <jgross@xxxxxxxx>; sstabellini@xxxxxxxxxx; Wei Liu
> <wei.liu2@xxxxxxxxxx>; George Dunlap <George.Dunlap@xxxxxxxxxx>;
> Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; Ian Jackson
> <Ian.Jackson@xxxxxxxxxx>; Tim (Xen.org) <tim@xxxxxxx>;
> julien.grall@xxxxxxx; jbeulich@xxxxxxxx
> 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 <jgross@xxxxxxxx>

Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
>  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@xxxxxxxxxxxxx
> https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.