From nobody Thu Jul 23 21:54:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1783603261; cv=none; d=zohomail.com; s=zohoarc; b=Ngl+qVC2v/jdVhMT+Mgw2RLgUDkIc4mIp75R+e4XxOThKWjSbDBAIt+0dV0QSFmy7XXYggOIjv6UE4XvLESqEw1bdAsbiKZ56Qc7Fpp/sFXJRoB9ld36enHvq+IQ26N+AqIroZJGQE39APYLveLkuRaGmfDaAYc8iFBOwvw4S3g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783603261; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UN5KRy+qpx74y5IV2ArkzdHWcgNqys8e5krbhcF67a4=; b=VVKVM0qkwhfhrIPGXzvoIdpRgpRdxakHkCkrR2zhqq9CnMf7XZEeWfsHeqTvyWQbICL8QTg9yjzYa6vdQrs9jGwGMnL9MphSMpJLyXy1+wJz8JSMFZl3EwWINlKuQBpGzosUi+c5+567JgVBxkC2Dz1NkTT8Vve4JQtsTu/5uBs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1783603261067909.6156344424214; Thu, 9 Jul 2026 06:21:01 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1358162.1612417 (Exim 4.92) (envelope-from ) id 1whogG-00016v-LT; Thu, 09 Jul 2026 13:20:44 +0000 Received: by outflank-mailman (output) from mailman id 1358162.1612417; Thu, 09 Jul 2026 13:20:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1whogG-00016m-Ir; Thu, 09 Jul 2026 13:20:44 +0000 Received: by outflank-mailman (input) for mailman id 1358162; Thu, 09 Jul 2026 13:20:43 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1whogF-00016M-GN for xen-devel@lists.xenproject.org; Thu, 09 Jul 2026 13:20:43 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1whogE-003han-TG for xen-devel@lists.xenproject.org; Thu, 09 Jul 2026 15:20:42 +0200 Received: from [10.42.69.5] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a4fa026-2eae-0a2a0a5409dd-0a2a45059b7a-8 for ; Thu, 09 Jul 2026 15:20:42 +0200 Received: from [185.255.28.34] (helo=prod-mta-13-01.swg-srv.net) by tlsNG-c201ff.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.2) (envelope-from ) id 6a4fa02a-4f1d-0a2a45050019-b9ff1c229e7f-3 for ; Thu, 09 Jul 2026 15:20:42 +0200 Received: from mail2.vates.fr ([37.26.189.201] mail2.vates.fr) (Authenticated sender: 8631fc262581453bbf619ec5b2062170/smtp/7773de5a-2839-4720-82ee-e06722ae1d3e) by prod-mta-13-01.swg-srv.net (ZoneMTA - prod-mta-13) with ESMTPSA id 19f470991a0000edb5.005 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 09 Jul 2026 13:20:37 +0000 Received: from julian.home (lfbn-gre-1-197-6.w90-112.abo.wanadoo.fr [90.112.16.6]) (Authenticated sender: julian.vetter@vates.tech) by mail2.vates.fr (Postfix) with ESMTPSA id 7ADA881C0B; Thu, 9 Jul 2026 15:20:36 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Feedback-ID" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; q=dns/txt; s=selector1; bh=UN5KRy+qpx74y5IV2ArkzdHWcgNqys8e5krbhcF67a4=; h=from:subject:date:message-id:to:cc:mime-version:content-type:feedback-id; b=UtUiVIcvNENcBMYIdUo//7vPTX1WHFEZeLO+EBwt6w3DT3XgRVlxEvAlsiSTDrg5f6vLjKV4s SqiHCbO9vPokaBWl4MbZdEgQR+MtxAu4SgCDz+LnXqGKP6kXBu4//sxdMlauN8aZGgxCXFNhW3M naKzgl8BnkBmlcZ6/kIWZD+QVyY28fwuMdTbtixjvTDQwmLlX5A52g9FDaBBWTG9Mf4P3KrRKeA z6C1vQKsgKFIKeriVVPgMw8ac70OTTKy5m399FJ3UwLEVWWwnf6bzsKL3bNC9fR7YexCdYzDwYV BlwsihynOjJje+OXeJ7/4epSi9S+u6q/qRZoBYO7MwOg== X-Zone-Loop: 33f50af23a08d294e13e2bf6ae7087e34ebe80f8d2c1 x-campaign-type: default x-transaction-id: 9ed13ff8-7867-4163-ac50-5aef772f8c08 x-swg-uid: 01-5101178b-2617-4b85-aea1-777b39d7ebf5 X-Mailer: Sweego Message-ID: <1783603237.8631fc262581453bbf619ec5b2062170.19f470991a0000edb5@vates.tech> x-swg-bid: 1783603237.8631fc262581453bbf619ec5b2062170.19f470991a0000edb5 Feedback-ID: default:8631fc262581453bbf619ec5b2062170:Sweego x-campaign-id: default x-client-id: 8631fc262581453bbf619ec5b2062170 X-Originating-IP: [37.26.189.201] From: Julian Vetter To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Julian Vetter Subject: [PATCH] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo Date: Thu, 9 Jul 2026 15:20:31 +0200 MIME-Version: 1.0 X-BM-Disclaimer: Yes Content-Type: multipart/alternative; boundary="-=Part.523.b858fd9adff023b0.19f47098f17.a822c42b8a04f393=-" X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1783603236636 X-purgate-ID: tlsNG-c201ff/1783603242-6215A12E-0A7CA93B/0/0 X-purgate-type: clean X-purgate-size: 1844 X-ZohoMail-DKIM: pass (identity @vates.tech) X-ZM-MESSAGEID: 1783603262499158500 ---=Part.523.b858fd9adff023b0.19f47098f17.a822c42b8a04f393=- Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When creating a domain on ARM, and passing XEN_DOMCTL_CONFIG_GIC_NATIVE for the gic_version field in the struct xen_arch_domainconfig, arch_sanitise_domain_config() resolves this to the approrpiate GIC_V2 or GIC_V3 version the domain actually has, based on the host's gic_hw_version(). That value is stored in the domain as d->arch.vgic.version, but can't be queried through any other domctl later. Toolstacks that create and build a domain in the same call already have this info from the createdomain reply and never need to ask again. Toolstacks that create a domain and build it later from a separate process do need to ask again. But, the ARM implementation only fills in info->flags and info->gpaddr_bits. info->arch_config is left zeroed, so XEN_DOMCTL_getdomaininfo always reports gic_version as XEN_DOMCTL_CONFIG_GIC_NATIVE (0) regardless of what was actually configured earlier. Signed-off-by: Julian Vetter --- xen/arch/arm/domctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c index 6c9a3f9920..b76af56fad 100644 --- a/xen/arch/arm/domctl.c +++ b/xen/arch/arm/domctl.c @@ -24,6 +24,8 @@ void arch_get_domain_info(const struct domain *d, info->flags |=3D XEN_DOMINF_hap; =20 info->gpaddr_bits =3D p2m_ipa_bits; + + info->arch_config.gic_version =3D d->arch.vgic.version; } =20 static int handle_vuart_init(struct domain *d,=20 --=20 2.53.0 --=20 | Vates=20 XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ---=Part.523.b858fd9adff023b0.19f47098f17.a822c42b8a04f393=---