From: Ian Campbell Subject: Re: [PATCH 10/11] libxc: add xc_domain_set_max_evtchn() Date: Tue, 1 Oct 2013 13:30:13 +0100 Message-ID: <1380630613.925.57.camel@kazak.uk.xensource.com> References: <1380279359-28817-1-git-send-email-david.vrabel@citrix.com> <1380279359-28817-11-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1380279359-28817-11-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: Ian Jackson , Keir Fraser , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2013-09-27 at 11:55 +0100, David Vrabel wrote: > From: David Vrabel > > Add xc_domain_set_max_evtchn(), a wrapper around the > DOMCTL_set_max_evtchn hypercall. > > Signed-off-by: David Vrabel Acked-by: Ian Campbell I'm happy for this to be committed by whoever takes the hypervisor side... > Cc: Ian Jackson > --- > tools/libxc/xc_domain.c | 11 +++++++++++ > tools/libxc/xenctrl.h | 12 ++++++++++++ > 2 files changed, 23 insertions(+), 0 deletions(-) > > diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c > index 81316d3..2cea6e3 100644 > --- a/tools/libxc/xc_domain.c > +++ b/tools/libxc/xc_domain.c > @@ -1766,6 +1766,17 @@ int xc_domain_set_virq_handler(xc_interface *xch, uint32_t domid, int virq) > return do_domctl(xch, &domctl); > } > > +int xc_domain_set_max_evtchn(xc_interface *xch, uint32_t domid, > + uint32_t max_port) > +{ > + DECLARE_DOMCTL; > + > + domctl.cmd = XEN_DOMCTL_set_max_evtchn; > + domctl.domain = domid; > + domctl.u.set_max_evtchn.max_port = max_port; > + return do_domctl(xch, &domctl); > +} > + > /* > * Local variables: > * mode: C > diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h > index 58d51f3..8cf3f3b 100644 > --- a/tools/libxc/xenctrl.h > +++ b/tools/libxc/xenctrl.h > @@ -847,6 +847,18 @@ int xc_domain_set_access_required(xc_interface *xch, > */ > int xc_domain_set_virq_handler(xc_interface *xch, uint32_t domid, int virq); > > +/** > + * Set the maximum event channel port a domain may bind. > + * > + * This does not affect ports that are already bound. > + * > + * @param xch a handle to an open hypervisor interface > + * @param domid the domain id > + * @param max_port maximum port number > + */ > +int xc_domain_set_max_evtchn(xc_interface *xch, uint32_t domid, > + uint32_t max_port); > + > /* > * CPUPOOL MANAGEMENT FUNCTIONS > */