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

Re: [PATCH v4] xen/domain: introduce DOMID_ANY


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 4 Feb 2026 10:00:03 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2rTzhXummHWWEJW7e/2JZ48DWUFsQOh8s3YxlG0PS1o=; b=wHLJ5IJwFBtUUJz7b+B2HqNY/ZGmIZo7BSgbx0F+mthDqBrBwkbHP1HihISnHoRJA7kMnpP3D+AXnOAo7udvdZ+pP97ydOSvAmrgtU+ZOS9glcunnjVVeYETIhxkoqRgNAGGWO2mCFO9kDomWxBYknhYV30nxvwxM6K6s7j6wgFjJ/hgEsP/TH8pmBwjpcN1Z4hU3B9TNNcQWSUQA2yGMXtKlAZfbQAclNZQsyqjq7Gl+PampUHkr/zTd37sahB5M/VDOEqFQ9dOt2xH2hZoi+vzCwL5veJ32WxUEMsREhUv/xYqA3JBr+ctF9KDRWf6hPsU6KqgzjNHlGkcljBAzw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GKTK4lOs9MmQ/5W7ikWfJnwgR00iM6NLJ+lBfQESkDSJOYl+PMlOQZopw9EI+fE+GXfunhRzKDGtBntcWUDFs2ogD4KVgd4SZYl73Msok9rWXK8jOPeA7f9yTDVJs2YdcCiHXXB0W1yMEfs3Biv7/cgGuk/1LFucQyT0V6IGmeRQBUsZ1tYhaA9Rn/wQKkQhaeHDVUrcd3+eQofsT54lPJPRCYeGahPold64ESeQxwG1z8OLZkIyIZjHctbf11XdG96jh9D8R+ttj1hDR7aRrGqoOcvC/oKxd1aNdJWtngX13jXuVOQncDcud+l4VrFfCONa0O/ANmS61KilJMrG0A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: dmukhin@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, anthony.perard@xxxxxxxxxx, julien@xxxxxxx, michal.orzel@xxxxxxx, sstabellini@xxxxxxxxxx, dmukhin@xxxxxxxx
  • Delivery-date: Wed, 04 Feb 2026 09:00:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Feb 04, 2026 at 08:56:10AM +0100, Jan Beulich wrote:
> On 04.02.2026 08:49, Roger Pau Monné wrote:
> > On Fri, Jan 09, 2026 at 06:07:48AM -0800, dmukhin@xxxxxxx wrote:
> >> --- a/xen/include/public/xen.h
> >> +++ b/xen/include/public/xen.h
> >> @@ -608,6 +608,11 @@ DEFINE_XEN_GUEST_HANDLE(mmuext_op_t);
> >>  /* DOMID_INVALID is used to identify pages with unknown owner. */
> >>  #define DOMID_INVALID        xen_mk_uint(0x7FF4)
> >>  
> >> +#if defined(__XEN__) || defined(__XEN_TOOLS__)
> >> +/* Domain ID allocator: search [1..DOMID_FIRST_RESERVED-1] range. */
> >> +#define DOMID_ANY            xen_mk_uint(0x7FF5)
> >> +#endif
> > 
> > I would attempt to word the comment in a more generic way.  While this
> > is now only used for the domain ID allocator, it's likely to gain more
> > uses going forward (Juergen already expressed interest):
> > 
> > "DOMID_ANY is used to signal no specific domid requested.  Handler
> > should pick a valid domid, or handle it as a broadcast value depending
> > on the context."
> 
> +1
> 
> > Also, I would remove the tools guards, I think once a DOMID_ constant
> > is allocated it becomes part of the public ABI, and it cannot be
> > withdrawn.  See for example DOMID_IDLE: it's only used internally in
> > the hypervisor AFAICT, yet the define is fully visible in the
> > headers.
> 
> It was me to ask for it to be guarded like this. DOMID_IDLE (and perhaps
> others) not being guarded (at least for IDLE: by just __XEN__) imo was a
> mistake. That mistake may in fact be correctable, if we could prove that
> the ID cannot usefully be passed into anywhere.

Even if it's not passed into anything, does it make sense to guard
them?  The reserved domid values are already consumed, ie: cannot be
reused in any way.  It just seem to me like more ifdefery churn for no
specific benefit.

Thanks, Roger.



 


Rackspace

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