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

Re: [Xen-devel] [PATCH v4 1/7] libxl: add definition of INVALID_DOMID to the API



> -----Original Message-----
> From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Sent: 31 January 2020 12:08
> To: Durrant, Paul <pdurrant@xxxxxxxxxxxx>; Roger Pau Monné
> <roger.pau@xxxxxxxxxx>
> Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx; Ian Jackson <ian.jackson@xxxxxxxxxxxxx>; Wei
> Liu <wl@xxxxxxx>
> 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.pau@xxxxxxxxxx>
> >> Sent: 31 January 2020 11:06
> >> To: Durrant, Paul <pdurrant@xxxxxxxxxxxx>
> >> Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>; xen-
> >> devel@xxxxxxxxxxxxxxxxxxxx; Ian Jackson <ian.jackson@xxxxxxxxxxxxx>;
> Wei
> >> Liu <wl@xxxxxxx>
> >> 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-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> >>>> Roger Pau Monné
> >>>> Sent: 22 January 2020 14:53
> >>>> To: Durrant, Paul <pdurrant@xxxxxxxxxxxx>
> >>>> Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>; xen-
> >>>> devel@xxxxxxxxxxxxxxxxxxxx; Ian Jackson <ian.jackson@xxxxxxxxxxxxx>;
> >> Wei
> >>>> Liu <wl@xxxxxxx>
> >>>> 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@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®.