From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: dmukhin@xen.org, xen-devel@lists.xenproject.org,
andrew.cooper3@citrix.com, anthony.perard@vates.tech,
julien@xen.org, michal.orzel@amd.com, sstabellini@kernel.org,
dmukhin@ford.com
Subject: Re: [PATCH v4] xen/domain: introduce DOMID_ANY
Date: Wed, 4 Feb 2026 10:00:03 +0100 [thread overview]
Message-ID: <aYMKk9YtrR7NOKyt@Mac.lan> (raw)
In-Reply-To: <0e3a1af4-d87c-405c-a0a7-598929df3f4b@suse.com>
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@xen.org 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.
next prev parent reply other threads:[~2026-02-04 9:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 14:07 [PATCH v4] xen/domain: introduce DOMID_ANY dmukhin
2026-01-30 0:37 ` Stefano Stabellini
2026-01-30 6:14 ` Jürgen Groß
2026-02-04 7:49 ` Roger Pau Monné
2026-02-04 7:56 ` Jan Beulich
2026-02-04 9:00 ` Roger Pau Monné [this message]
2026-02-04 9:15 ` Jan Beulich
2026-02-04 9:25 ` Juergen Gross
2026-02-04 9:51 ` Jan Beulich
2026-02-04 10:01 ` Juergen Gross
2026-02-04 10:04 ` Jan Beulich
2026-02-04 10:12 ` Juergen Gross
2026-02-04 10:15 ` Jan Beulich
2026-02-04 10:26 ` Jürgen Groß
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYMKk9YtrR7NOKyt@Mac.lan \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=dmukhin@ford.com \
--cc=dmukhin@xen.org \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.