[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 5/8] ioreq-server: add support for multiple servers
> -----Original Message----- > From: George Dunlap [mailto:george.dunlap@xxxxxxxxxxxxx] > Sent: 03 April 2014 16:43 > To: Paul Durrant; George Dunlap > Cc: xen-devel@xxxxxxxxxxxxx; Ian Jackson; Ian Campbell; Jan Beulich; Stefano > Stabellini > Subject: Re: [Xen-devel] [PATCH v4 5/8] ioreq-server: add support for > multiple servers > > On 04/03/2014 04:39 PM, Paul Durrant wrote: > >> -----Original Message----- > >> From: dunlapg@xxxxxxxxx [mailto:dunlapg@xxxxxxxxx] On Behalf Of > >> George Dunlap > >> Sent: 03 April 2014 16:33 > >> To: Paul Durrant > >> Cc: xen-devel@xxxxxxxxxxxxx; Ian Jackson; Ian Campbell; Jan Beulich; > Stefano > >> Stabellini > >> Subject: Re: [Xen-devel] [PATCH v4 5/8] ioreq-server: add support for > >> multiple servers > >> > >> On Wed, Apr 2, 2014 at 4:11 PM, Paul Durrant <paul.durrant@xxxxxxxxxx> > >> wrote: > >> +++++++++++++++++++++++++++++++++++--- > >>> > >>> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c > >>> index 369c3f3..8cec171 100644 > >>> --- a/tools/libxc/xc_domain.c > >>> +++ b/tools/libxc/xc_domain.c > >>> @@ -1284,6 +1284,181 @@ int xc_get_hvm_param(xc_interface > *handle, > >> domid_t dom, int param, unsigned long > >>> return rc; > >>> } > >>> > >>> +int xc_hvm_create_ioreq_server(xc_interface *xch, > >>> + domid_t domid, > >>> + ioservid_t *id) > >>> +{ > >>> + DECLARE_HYPERCALL; > >>> + DECLARE_HYPERCALL_BUFFER(xen_hvm_create_ioreq_server_t, > arg); > >>> + int rc; > >>> + > >>> + arg = xc_hypercall_buffer_alloc(xch, arg, sizeof(*arg)); > >>> + if ( arg == NULL ) > >>> + return -1; > >>> + > >>> + hypercall.op = __HYPERVISOR_hvm_op; > >>> + hypercall.arg[0] = HVMOP_create_ioreq_server; > >>> + hypercall.arg[1] = HYPERCALL_BUFFER_AS_ARG(arg); > >>> + arg->domid = domid; > >>> + rc = do_xen_hypercall(xch, &hypercall); > >>> + *id = arg->id; > >>> + xc_hypercall_buffer_free(xch, arg); > >>> + return rc; > >>> +} > >> Sorry if I missed it, but was there anywhere the 8-server limit is > >> checked? What happens if someone calls xc_hvm_create_ioreq_server() > 9 > >> times? > > Just checking -- did you miss this question, or are you going to come > back to it later? :-) > Sorry, I did miss that. The limit of 8 is not the number of servers, it's the number of pages. If someone tries to create too many servers the page allocation code will fail and thus the creation will fail with an ENOMEM. Paul _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |