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

Re: [PATCH] Fix fallout from DOMID_ANY ABI breakage


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 27 May 2026 19:08:05 +0200
  • 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=ujP4l/sxPLt2T2Vv7PlHyuCa+rq/V5MUfr4toMNe9gY=; b=IiEusqYjeKw/tNNffSS7eOh/0yO5RKqxzakgk9ginoQqc/K1UFo5YsXZi44R8laJ+sqUfwp+PATxToK0Wx0FpCi2sNOjCo4BClkYcJjUpI1NqQfuw4XcBf1HXV0t82SY7TZmGqhIcOQpiVqxLJNqJNdP1r2RDEtBWbawnHp+GwJrSkkzNwThZZwwo54HB+K9y9dSuDTOsFUbaQnUr9CRY3+fivZ4F0UFMOBNR+me42m5UYiioQgxpMHB/pHD1ga7f/Nlh9mBTNbn194zgAv/u119Y08QFN0R/I/xdQol8ttlb4HErUGMaeouwRwRJ8DcVuUna62m3HO4XkT+sFgEVg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DylwN425p+RIg390RJ2Q+PlPvWdS1o0YgfGe3XaucVxsKOThXVSQOVlk6buS0SZicuTB2srARe10CPrAYcz3IvGl739hn+R73DkmPUGP9Cp7I44QmvgE5S8NFEDAm5CSUCPQbjXAZKTJjmkcu6Nm6x7DSEgk8FBTDNUkIczVFmGbf1sGBRJq3KwRYkT/rZ7spsvJYrtur8TASeyvkLNI4mK/sDV4SmFz14MC8OsZghg2yd0Fxo6LQce/kyiYm82+0wPP+p5KDbKf8iKN37SULrw7if/HhTIfIZP6mgahyyt9NpNmsErpBWx9Zfs1VMwJF494aEQBhHTh8nZYgh5XhA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Denis Mukhin <dmukhin@xxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Wed, 27 May 2026 17:08:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, May 27, 2026 at 05:57:58PM +0100, Andrew Cooper wrote:
> Commit 23e2479ff9de ("xen/domain: introduce DOMID_ANY") broke at least:
> 
>  * xenstored domains
>  * The Python bindings
>  * The Ocaml bindings (i.e XAPI, and therefore XenServer/XCP-ng)
> 
> by causing Xen to reject 0 (the wildcard sentinel for decades) and
> DOMID_INVALID (a recently introduced wildcard sentinel) without adjusting the
> callers of xc_domain_create().
> 
> Under other circumstances I'd revert, but xenstored has gained a dependent use
> of DOMID_ANY.
> 
> Fix up the remaining in-tree callers, which covers init-xenstore-domain and
> the python bindings.  The Ocaml bindings, like libxc itself, expose this ABI
> detail to their caller, so need fixing individually.

I think this will also affect the rust crate(s), even when those don't
use the libxc bindings.

> 
> Leave a very clear message in CHANGELOG.md that all external callers need
> altering.
> 
> Fixes: 23e2479ff9de ("xen/domain: introduce DOMID_ANY")
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

> ---
> CC: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> CC: Michal Orzel <michal.orzel@xxxxxxx>
> CC: Jan Beulich <jbeulich@xxxxxxxx>
> CC: Julien Grall <julien@xxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> CC: Juergen Gross <jgross@xxxxxxxx>
> CC: Denis Mukhin <dmukhin@xxxxxxxx>
> CC: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> 
> Both Roger and I said no to the DOMID_ANY change.  We both think that there is
> still insufficient justification to be adding it as a new constant.  Next time
> it's going to be a straight nack.
> ---
>  CHANGELOG.md                         | 4 ++++
>  tools/helpers/init-xenstore-domain.c | 2 +-
>  tools/python/xen/lowlevel/xc/xc.c    | 2 +-
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/CHANGELOG.md b/CHANGELOG.md
> index 25f5a192ed48..1b54acf912a5 100644
> --- a/CHANGELOG.md
> +++ b/CHANGELOG.md
> @@ -7,6 +7,10 @@ The format is based on [Keep a 
> Changelog](https://keepachangelog.com/en/1.0.0/)
>  ## [4.22.0 
> UNRELEASED](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging)
>  - TBD
>  
>  ### Changed
> + - Users of xc_domain_create() must now pass DOMID_ANY to obtain an
> +   automatically allocated domid.  The prior sentinel values (0 since the
> +   birth of Xen, and DOMID_INVALID since Xen 4.21) now no longer represent a
> +   wildcard input.

Maybe also mention XEN_DOMCTL_createdomain explicitly, to notice is
not only the callers of libxc that needs adjustment, but also users of
the hypercall itself not going through libxc.

Thanks, Roger.



 


Rackspace

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