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

Re: [Xen-devel] [PATCH v5 5/7] libxl: allow creation of domains with a specified or random domid



> -----Original Message-----
> From: Ian Jackson <ian.jackson@xxxxxxxxxx>
> Sent: 18 February 2020 11:17
> To: Durrant, Paul <pdurrant@xxxxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Wei Liu <wl@xxxxxxx>; Anthony Perard
> <anthony.perard@xxxxxxxxxx>; Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>;
> George Dunlap <George.Dunlap@xxxxxxxxxx>; Jan Beulich <jbeulich@xxxxxxxx>;
> Julien Grall <julien@xxxxxxx>; Konrad Rzeszutek Wilk
> <konrad.wilk@xxxxxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>;
> Jason Andryuk <jandryuk@xxxxxxxxx>
> Subject: RE: [PATCH v5 5/7] libxl: allow creation of domains with a
> specified or random domid
> 
> Durrant, Paul writes ("RE: [PATCH v5 5/7] libxl: allow creation of domains
> with a specified or random domid"):
> > No, the domain will not be leaked. The existing failure handling in
> libxl will clean up if *domid != INVALID_DOMID.
> 
> Sorry if I was confused; I will read this again.
> 

It is hard to follow the error paths. Early on in development I ended up with 
domains getting destroyed when I didn't want them to be (when 
xc_domain_create() failed due to a duplicate domid).

> > > > diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
> > > > index d2198dffad..75b1619d0d 100644
> > > > --- a/xen/include/public/xen.h
> > > > +++ b/xen/include/public/xen.h
> > > > @@ -614,6 +614,9 @@ DEFINE_XEN_GUEST_HANDLE(mmuext_op_t);
> > > >  /* Idle domain. */
> > > >  #define DOMID_IDLE           xen_mk_uint(0x7FFF)
> > > >
> > > > +/* Mask for valid domain id values */
> > > > +#define DOMID_MASK           xen_mk_uint(0x7FFF)
> > >
> > > This needs a hypervisor maintainer ack.
> > >
> > > Please split it into its own patch, with a rationale, etc.
> >
> > Ok, but it has no rationale without the rest of this patch; I can only
> assert that it 'will be needed by a subsequent patch'.
> 
> What do the Xen maintainers, and my tools co-maintainers think ?
> 
> I was hoping for a rationale along the lines of:
> 
>   This is useful for programs which need to [explanation],
>   including for example, libxl, which is going to want to
>   randomly generate domids.
> 
> Maybe it needs some explanation of why this belongs in the Xen public
> headers rather than in some header available to libxc, libxl and other
> tools stuff ?

Ok, I'll try words along those lines.

  Paul

> 
> Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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