[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v10 02/11] 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> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- V4: - use domid_t (Wei Liu) --- tools/libxc/include/xenctrl.h | 13 +++++++++++++ tools/libxc/xc_domain.c | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 073fbc9b08..182367e7f4 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -1064,6 +1064,19 @@ 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 maptrack frames a domain + * can have. Must be used at domain setup time and only then. + * + * @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, domid_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 f40dc4fd7b..4a7078008f 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -2266,6 +2266,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, domid_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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |