> -----Original Message----- > From: Andrew Cooper <andrew.coop...@citrix.com> > Sent: 31 January 2020 12:08 > To: Durrant, Paul <pdurr...@amazon.co.uk>; Roger Pau Monné > <roger....@citrix.com> > Cc: Anthony PERARD <anthony.per...@citrix.com>; xen- > de...@lists.xenproject.org; Ian Jackson <ian.jack...@eu.citrix.com>; Wei > Liu <w...@xen.org> > Subject: Re: [Xen-devel] [PATCH v4 1/7] libxl: add definition of > INVALID_DOMID to the API > > On 31/01/2020 11:10, Durrant, Paul wrote: > >> -----Original Message----- > >> From: Roger Pau Monné <roger....@citrix.com> > >> Sent: 31 January 2020 11:06 > >> To: Durrant, Paul <pdurr...@amazon.co.uk> > >> Cc: Anthony PERARD <anthony.per...@citrix.com>; xen- > >> de...@lists.xenproject.org; Ian Jackson <ian.jack...@eu.citrix.com>; > Wei > >> Liu <w...@xen.org> > >> Subject: Re: [Xen-devel] [PATCH v4 1/7] libxl: add definition of > >> INVALID_DOMID to the API > >> > >> On Fri, Jan 31, 2020 at 10:31:49AM +0000, Durrant, Paul wrote: > >>>> -----Original Message----- > >>>> From: Xen-devel <xen-devel-boun...@lists.xenproject.org> On Behalf Of > >>>> Roger Pau Monné > >>>> Sent: 22 January 2020 14:53 > >>>> To: Durrant, Paul <pdurr...@amazon.co.uk> > >>>> Cc: Anthony PERARD <anthony.per...@citrix.com>; xen- > >>>> de...@lists.xenproject.org; Ian Jackson <ian.jack...@eu.citrix.com>; > >> Wei > >>>> Liu <w...@xen.org> > >>>> Subject: Re: [Xen-devel] [PATCH v4 1/7] libxl: add definition of > >>>> INVALID_DOMID to the API > >>>> > >>>> On Wed, Jan 22, 2020 at 02:44:40PM +0000, Paul Durrant wrote: > >>>>> Currently both xl and libxl have internal definitions of > >> INVALID_DOMID > >>>>> which happen to be identical. However, for the purposes of > >> describing > >>>> the > >>>>> behaviour of libxl_domain_create_new/restore() it is useful to have > >> a > >>>>> specified invalid value for a domain id. > >>>>> > >>>>> This patch therefore moves the libxl definition from > >> libxl_internal.h to > >>>>> libxl.h and removes the internal definition from xl_utils.h. The > >>>> hardcoded > >>>>> '-1' passed back via domcreate_complete() is then updated to > >>>> INVALID_DOMID > >>>>> and comment above libxl_domain_create_new/restore() is accordingly > >>>>> modified. > >>>> Urg, it's kind of ugly to add another definition of invalid domid > when > >>>> there's already DOMID_INVALID in the public headers. I guess there's > a > >>>> reason I'm missing for not using DOMID_INVALID instead of introducing > >>>> a new value? > >>>> > >>> TBH I don't know. As far as xl/libxl goes, domids are uint32_ts so > maybe > >> DOMID_INVALID was for some reason not considered appropriate? > > Read the commit message where I did the blanket change to use uint32_t. > > c/s 5b42c82f55 > > Does this really need to enter the API? >
I need a 'magic' value for RANDOM_DOMID so it seemed reasonable to make this part of the xl/libxl API too. I don't think libxc is in scope here. Paul > ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel