|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v5] xen/domain: introduce DOMID_ANY
On Mon, Mar 02, 2026 at 02:25:33PM +0000, Anthony PERARD wrote:
> On Thu, Feb 05, 2026 at 03:51:26PM -0800, dmukhin@xxxxxxxx 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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |