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

Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid



On 16.01.2020 10:46, Durrant, Paul wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 16 January 2020 10:40
>> To: Durrant, Paul <pdurrant@xxxxxxxxxxxx>
>> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Ian Jackson
>> <ian.jackson@xxxxxxxxxxxxx>; Wei Liu <wl@xxxxxxx>; Anthony PERARD
>> <anthony.perard@xxxxxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>;
>> George Dunlap <George.Dunlap@xxxxxxxxxxxxx>; Julien Grall
>> <julien@xxxxxxx>; Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>; Stefano
>> Stabellini <sstabellini@xxxxxxxxxx>; jandryuk@xxxxxxxxx
>> Subject: Re: [PATCH v3 4/6] libxl: allow creation of domains with a
>> specified or random domid
>>
>> On 16.01.2020 10:36, Paul Durrant wrote:
>>> --- 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           0x7FFF
>>
>> Seeing it used in context, any reason not to use xen_mk_uint()
>> here as well?
>>
> 
> I did wonder but I thought it best not to impose a type on a mask.

I'd be happy to see the other DOMID_* uses dropped (I don't see
whey they had a U suffix originally, which was then converted
to xen_mk_uint()), but I'd prefer the entire set to be consistent.
I can see in general why a mask might better not be explicitly
(or implicitly) unsigned, but here I don't really see plausible
uses of ~ on the mask.

Jan

_______________________________________________
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®.