From: dmukhin@ford.com
To: Anthony PERARD <anthony.perard@vates.tech>
Cc: dmukhin@ford.com, xen-devel@lists.xenproject.org,
andrew.cooper3@citrix.com, jbeulich@suse.com, julien@xen.org,
michal.orzel@amd.com, roger.pau@citrix.com,
sstabellini@kernel.org
Subject: Re: [PATCH v5] xen/domain: introduce DOMID_ANY
Date: Mon, 2 Mar 2026 22:23:21 -0800 [thread overview]
Message-ID: <aaZ+WZq+qTYaW+Sh@kraken> (raw)
In-Reply-To: <aaWd2d8yzU-mQ6Ub@l14>
On Mon, Mar 02, 2026 at 02:25:33PM +0000, Anthony PERARD wrote:
> On Thu, Feb 05, 2026 at 03:51:26PM -0800, dmukhin@ford.com wrote:
> > diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
> > index bfc9149096a3..714e71441498 100644
> > --- a/tools/libs/light/libxl_create.c
> > +++ b/tools/libs/light/libxl_create.c
> > @@ -676,15 +676,14 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_config *d_config,
> > if (ret < 0)
> > break;
> >
> > - v &= DOMID_MASK;
> > - if (!libxl_domid_valid_guest(v))
> > - continue;
> > -
> > - local_domid = v;
> > + local_domid = v & DOMID_MASK;
> > } else {
> > local_domid = info->domid; /* May not be valid */
> > }
> >
> > + if (!libxl_domid_valid_guest(local_domid))
> > + local_domid = DOMID_ANY;
>
> Well, that make it possible to have DOMID_ANY selected when a "random"
> domid was asked for, and this value is more likely than any other domid.
> I don't think it's wise to change that. The domid generated in the
> random case was already valid, no need to check again.
>
> Coud you move the new validity check into the case where domid isn't
> "random" or introduce a new case in the if/else chain ?
> (something like that for the second option: if (domid==random) elif
> (domid.is_valid) else (use domid))
Will do, thanks.
--
Denis
prev parent reply other threads:[~2026-03-03 6:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 23:51 [PATCH v5] xen/domain: introduce DOMID_ANY dmukhin
2026-02-17 15:31 ` Stefano Stabellini
2026-02-25 23:54 ` Stefano Stabellini
2026-03-02 14:25 ` Anthony PERARD
2026-03-03 6:23 ` dmukhin [this message]
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=aaZ+WZq+qTYaW+Sh@kraken \
--to=dmukhin@ford.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.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.