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

Re: [PATCH] xen/domain: introduce DOMID_ANY



On 16.09.2025 22:51, Andrew Cooper wrote:
> On 16/09/2025 1:05 pm, Jan Beulich wrote:
>> On 16.09.2025 19:37, dmukhin@xxxxxxx wrote:
>>> --- a/xen/include/public/xen.h
>>> +++ b/xen/include/public/xen.h
>>> @@ -608,6 +608,9 @@ DEFINE_XEN_GUEST_HANDLE(mmuext_op_t);
>>>  /* DOMID_INVALID is used to identify pages with unknown owner. */
>>>  #define DOMID_INVALID        xen_mk_uint(0x7FF4)
>>>  
>>> +/* Domain ID allocator: search [1..DOMID_FIRST_RESERVED-1] range. */
>> Considering this is an implementation detail of the hypervisor, ...
>>
>>> +#define DOMID_ANY            DOMID_INVALID
>> ... I don't think this should go in a public header.
> 
> Except we want it for the toolstack to use, as part of preventing 0
> being a magic number to XEN_DOMCTL_createdomain.

Where would the toolstack want to use it? Domain creation? And why 0
(which isn't DOMID_INVALID / DOMID_ANY)?

In any event, if exposure to the tool stack is wanted, then yes, this
wants to stay here, but guarded by a __XEN__ || __XEN_TOOLS__ check
like we do elsewhere.

Jan



 


Rackspace

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