From nobody Sat May 23 21:07:55 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1779430860; cv=none; d=zohomail.com; s=zohoarc; b=ep9NW3W4zJ5G+abfUEBW7VX1CYetTpKuAqyzIr3QmERgp68lZK/pd51i6OhqOGhGIDBLSsOcdRfpmIZ8jM/MUWGp03PiDMbpW2cJLvsucVdCgKnZb9SQYmJGJwBj5QXieZ51TlyMwLM2fdxEMkQqUQtUOypfKHKJe+4evymjEyA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779430860; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OXWRI7l7nK7SIe4W1b4avZ/Bw1tdkEXb3sGKmZFhqOg=; b=lsmoVtCFNDP8fud4LzNWvmC3ieuYduYBv6a5tG9QuFW5cDzzmAC9P/5pHnmv5D6gIwzpwDbD4EOS1ywEQ3MAh+liEUqqpFTAcCSJN+8fBiKW/4D3iyqDnkBhkRNq00HShG8SUSLEz0AB6VsLShgLHafk4BWPlPPEomvepdHm3wI= 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 1779430860093983.7349950798314; Thu, 21 May 2026 23:21:00 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1316310.1585705 (Exim 4.92) (envelope-from ) id 1wQJFQ-0000D6-Te; Fri, 22 May 2026 06:20:40 +0000 Received: by outflank-mailman (output) from mailman id 1316310.1585705; Fri, 22 May 2026 06:20:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wQJFQ-0000Cz-Qm; Fri, 22 May 2026 06:20:40 +0000 Received: by outflank-mailman (input) for mailman id 1316310; Fri, 22 May 2026 06:20:39 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wQJFO-0008RG-U8 for xen-devel@lists.xenproject.org; Fri, 22 May 2026 06:20:39 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wQJFO-00DS7I-9x for xen-devel@lists.xenproject.org; Fri, 22 May 2026 08:20:38 +0200 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a0ff5ae-bab6-0a2a0a5309dd-0a2a4504ab7a-22 for ; Fri, 22 May 2026 08:20:38 +0200 Received: from [209.85.128.43] (helo=mail-wm1-f43.google.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a0ff5b6-1dec-0a2a45040019-d155802bc54c-3 for ; Fri, 22 May 2026 08:20:38 +0200 Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-488af9fdaa7so33186895e9.1 for ; Thu, 21 May 2026 23:20:38 -0700 (PDT) Received: from EPUAKYIW02F7.. ([45.12.24.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490454a0b82sm21875725e9.9.2026.05.21.23.20.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2026 23:20:37 -0700 (PDT) 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=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779430838; x=1780035638; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OXWRI7l7nK7SIe4W1b4avZ/Bw1tdkEXb3sGKmZFhqOg=; b=ozY1tmOXhhdQQKc1kcwqjZ8FXx4C06qjCBT+0IXu8r6ivxqLEZ2nKcX3o07U/IqW8/ 3tPKw74SWWK5QCd4bvey2PB/OUtNRgpHMSzgoqEEC8R6+yvmSM0CZ/hKKhWs1jECvRDp SjqbUMkZm0Boa/UEQXrSsZspjzMEO3BfBZoCxOjuys5YD7/49j24elziiboszYFV7BGI LO9JGc/yFDdJxQT0dIl+0Nu9GT925XUbw5gd8y5G8fv1kCGDqYNVZX5OqTEOWhQLjkMV JwzeZf2b00bOG6uY0CAaIplZcUFuDu911V5OqCA17lfCSmOZahAb4CVP1wj1NMz9iEQ6 jATA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779430838; x=1780035638; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OXWRI7l7nK7SIe4W1b4avZ/Bw1tdkEXb3sGKmZFhqOg=; b=dvrDkcaaDUxH1A76uj0OzoM4MIyrJ1BMNh/OEiCBK2BdzB6SZw9GNiGjCbA55ELipo dliT8+YNnwPCT1U8qWXXOSUWAvZDWvoeK/1p1wI8K7sSNa68aL5TOzOjTHz1k1EcDXQJ EJyX/FaaTeW0loFyQ8E06VLwS7nuqcJN5o45jVeKFiKU2gHYGtDvXnNuUQERSHMjnSuc u9kvewWQc0SJEOMAW9H3u2f1EOoUTZh0SsS1R6xfaWtL1jNoBU/M0FBFt/I4fFBO2fY5 wS+5gCrAxdZNj325AFoutaXTJMPJq5eVAtwvqIeaRxHQil+4cqEI5iOgUAFe2dd3OIh1 22uw== X-Gm-Message-State: AOJu0YzZgOUTNEJd9HyZ3iYrGqIhguGiY7ug8+c65Qkjq17UWI/xXHSl Up0C5geqEsS24FbhRiacX9g0IHOOiJSMACCWl9iuSUk/M3sbrsslvIew21QZxoJL X-Gm-Gg: Acq92OGQsGgCl/2BcEEsItXb7vY5zPonkEQ+1JtVKHeTmEwtnJAFGhX7ueyX1Li3VCm jqVbeux2teCs2Xy+Q520RsSTJ7etyf8XILDMrpMcsZCbvmKwTiUVd1ytf6h+Mkh2QGiaKBiaeJn ZgkOQizzrXIbOvNNIeYoiG2qtHgqgwIkkQN2YdtWEFf+JoNwckVp6/7XDrtqAW6QDAwDmuj9U29 xptrGVMSpI8LUkbxhp8tAuskPu93M7TsnG4WQLSJhNj2tO1oik5K1kEe1YPe8nCsBzeddMHKkob sZoOlgkMWwS7qvt//dsbsyped7vXF9tmdno+FqpVmh4qM0zUGX8YMGviLISUVkmH3FAGrdBFkII L1FrMuxl2wUiKd3XsjPzwTxybR+9t+dW50J1r9Cqx0EKTrN41ns+p5J2j9mn0cFA9ls0psgW96j MxYMroMhk7cdOdKJc2YmBMl9Pfyg== X-Received: by 2002:a05:600c:3547:b0:48f:e230:8caa with SMTP id 5b1f17b1804b1-490428f2dc2mr20958225e9.30.1779430837544; Thu, 21 May 2026 23:20:37 -0700 (PDT) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [PATCH 1/2] xen/arm: propagate vGIC vCPU init failures Date: Fri, 22 May 2026 09:18:26 +0300 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-ebf023/1779430838-2997A3FF-8ED48185/0/0 X-purgate-type: clean X-purgate-size: 4972 X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1779430862107154100 Content-Type: text/plain; charset="utf-8" From: Mykola Kvach The vGIC per-vCPU init callback can fail. In particular, GICv3 rejects a vCPU when the domain's redistributor layout has no MMIO slot covering that vCPU. However, the generic vGIC init path ignored the callback return value, so vcpu_create() could succeed with an invalid vGICv3 per-vCPU state. This can be reproduced on FVP Base RevC by exposing a 2 MiB GICv3 redistributor region to Dom0 and booting Xen with: maxcpus=3D1 dom0_max_vcpus=3D64 The host GICv3 redistributor range is: region 0: 0x0000002f100000 - 0x0000002f300000 With Xen's guest redistributor frame size of 128 KiB, that range covers 16 guest redistributors. vCPU16 and above have no corresponding redistributor slot. Before this fix, Xen detected the missing redistributors: d0: Unable to find a re-distributor for VCPU 16 ... d0: Unable to find a re-distributor for VCPU 63 but ignored the error and continued as if the secondary vCPUs had been created correctly. Dom0 then saw 64 possible CPUs and could hang during secondary CPU bring-up: smp: Bringing up secondary CPUs ... d0v15: vGICR: SGI: unhandled word write ... to ICACTIVER0 Propagate the vGIC vcpu_init() error so the caller can stop creating secondary vCPUs. With this fix, Dom0 construction reports: d0: Unable to find a re-distributor for VCPU 16 Failed to allocate d0v16 and the guest continues booting with the vCPUs created before the failure: smp: Brought up 1 node, 16 CPUs Free the private IRQ rank allocated by vcpu_vgic_init() on this error path. The caller will still run the generic vCPU creation cleanup, but XFREE() clears the pointer so that cleanup remains idempotent. Also fix the host-layout redistributor region count for the case where the requested vCPU count is larger than the capacity of all host redistributor regions. The old code always stored i + 1 after the loop. That is correct when the loop stops inside a valid region because the requested vCPU count is covered. If the loop exits after consuming all hardware regions, i is already equal to the number of allocated regions, so i + 1 records one region too many. In the same FVP setup, that off-by-one made Xen describe host-layout GICR state beyond the populated redistributor region list. Dom0 then accessed the GICR MMIO window described in its device tree, but Xen could not match the access to a valid emulated redistributor frame. During debugging this was seen as an unexpected vGICR access followed by a guest panic: d0v0: vGICR: unknown gpa read address 000000002f10ffe8 pc : gic_iterate_rdists+0x4c/0x104 Kernel panic - not syncing: Attempted to kill the idle task! Keep the existing best-effort Dom0 policy: a failure to create a secondary vCPU stops the secondary vCPU creation loop, but does not fail the whole Dom0 boot. Fixes: ea37fd21110b ("xen/arm: split vgic driver into generic and vgic-v2 d= river") Fixes: 54ec59f6b0b3 ("xen/arm: vgic-v3: Don't create empty re-distributor r= egions") Signed-off-by: Mykola Kvach --- xen/arch/arm/vgic-v3.c | 3 ++- xen/arch/arm/vgic.c | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index 77517c3030..360778eb32 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -1834,7 +1834,8 @@ static int vgic_v3_domain_init(struct domain *d) * not match the number of pCPUs). Update the number of regions to * avoid exposing unused region as they will not get emulated. */ - d->arch.vgic.nr_regions =3D i + 1; + d->arch.vgic.nr_regions =3D (i =3D=3D vgic_v3_hw.nr_rdist_regions)= ? + i : i + 1; =20 d->arch.vgic.intid_bits =3D vgic_v3_hw.intid_bits; } diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index 6647071ad4..e55e484493 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -368,7 +368,7 @@ void domain_vgic_free(struct domain *d) =20 int vcpu_vgic_init(struct vcpu *v) { - int i; + int i, ret; =20 v->arch.vgic.private_irqs =3D xzalloc(struct vgic_irq_rank); if ( v->arch.vgic.private_irqs =3D=3D NULL ) @@ -377,7 +377,12 @@ int vcpu_vgic_init(struct vcpu *v) /* SGIs/PPIs are always routed to this VCPU */ vgic_rank_init(v->arch.vgic.private_irqs, 0, v->vcpu_id); =20 - v->domain->arch.vgic.handler->vcpu_init(v); + ret =3D v->domain->arch.vgic.handler->vcpu_init(v); + if ( ret ) + { + XFREE(v->arch.vgic.private_irqs); + return ret; + } =20 memset(&v->arch.vgic.pending_irqs, 0, sizeof(v->arch.vgic.pending_irqs= )); for (i =3D 0; i < 32; i++) @@ -944,4 +949,3 @@ void vgic_check_inflight_irqs_pending(struct vcpu *v, u= nsigned int rank, uint32_ * indent-tabs-mode: nil * End: */ - --=20 2.43.0 From nobody Sat May 23 21:07:55 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1779430855; cv=none; d=zohomail.com; s=zohoarc; b=FLLquJXu6/6Z573M5q2hQJkOuTAzT/GW6HwkE3V1K+kpJvsg4Ftb2rmHus2lYQJhLq/x/lzcHgWeZAWiQ8Wz56Jps6a1UzVFlsH7MTOThilgKmTWwjLZZ3VJWrqkMZpw0eWityq7Bbfut78fqVlea3QWjLFRSa63YNwBkSg49VE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779430855; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=URS8l+xtKjxWl9mLzqtuCFINDsdxzGnUqvmZmpuEXJI=; b=nL4BJKARs16cCW8ug6HAVTj0ZWZByXTaXuKgm9lRNG3/+5nz0aNLNeIYpY0NYhY0jPKybudSATciW3vyu3gVC0XPsgOFm5AYaedrVOZK7RJAbEPwX761gLvLQXu4HPjM4tXaixTJFUH43A3ATDcrTnvMB0eZtRgBlTEj1BD9Z2c= 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 1779430855292180.87551809017543; Thu, 21 May 2026 23:20:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1316311.1585710 (Exim 4.92) (envelope-from ) id 1wQJFR-0000J0-9r; Fri, 22 May 2026 06:20:41 +0000 Received: by outflank-mailman (output) from mailman id 1316311.1585710; Fri, 22 May 2026 06:20:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wQJFR-0000IU-6L; Fri, 22 May 2026 06:20:41 +0000 Received: by outflank-mailman (input) for mailman id 1316311; Fri, 22 May 2026 06:20:40 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wQJFQ-0000Cf-1R for xen-devel@lists.xenproject.org; Fri, 22 May 2026 06:20:40 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wQJFP-00FxMi-AB for xen-devel@lists.xenproject.org; Fri, 22 May 2026 08:20:39 +0200 Received: from [10.42.69.6] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a0ff5b4-5cb7-0a2a0a5109dd-0a2a4506bd44-8 for ; Fri, 22 May 2026 08:20:39 +0200 Received: from [209.85.128.44] (helo=mail-wm1-f44.google.com) by tlsNG-16d1c6.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a0ff5b7-7371-0a2a45060019-d155802ce0d1-3 for ; Fri, 22 May 2026 08:20:39 +0200 Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-488b0e1b870so95567515e9.2 for ; Thu, 21 May 2026 23:20:39 -0700 (PDT) Received: from EPUAKYIW02F7.. ([45.12.24.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490454a0b82sm21875725e9.9.2026.05.21.23.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2026 23:20:38 -0700 (PDT) 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=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779430839; x=1780035639; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=URS8l+xtKjxWl9mLzqtuCFINDsdxzGnUqvmZmpuEXJI=; b=Xz5wPbVgBqp0rbkViHoiybbCP0hQM0ibkvYcVLyyWldMXZtzKOFnGkSO1f6lmYnVD9 Sl7L69Odho8Dnl5XkJsond054vpAvExkxCCQZ2eEnt76GtOH151x2vPIPVWHzKrg8+UQ Ajrg35XqrRwEElukMSqNyh5jSmk20VUY9TLAqqk9huwBUHgpTQAx+VMb4no/4oraNMoy GCVEetgQ2X24X3nZA0U8B0bcePDK22xku9OWj5UCTOaq2xo2oNK4azqQ5yCw/0rYGbY8 RYVvCRLlcZ3sxXONCh42xVIr2jfGUxlJsfCopNLM6KZbB9EFcC/t+U6Rvfb1AG+34Fcf VA8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779430839; x=1780035639; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=URS8l+xtKjxWl9mLzqtuCFINDsdxzGnUqvmZmpuEXJI=; b=AB4VjjvpCQjw/37rhc00me6I0ZKHfOmtBgtLitCM+P7Xv9uvHCqNm38Skb2f8RYQsC ok8jYaNSoFfL1G1nvpYQHRQPhLH+ymkG5s16wGP0IA/18FhtIIRh1digaxWx2ck6rals TQ93prOdemc6FfvGhh2/5+c+zI7UkkPaPzkyWIrNb3jovxZbco+MTIv9/grH6HZtmgnF JA36tKDMA/b3QynaVQIMCHFp7E/J8BJwfiVgV4BgHl3Q+dq0SkdPp4Oj07LrpgvrScma 9LsECjg10MzUn+f8wP0ZRugjJdWHV4WkJG3oSqG21aDwet7h2ycPKdqqM4h6/3Sc4NJ6 UZsg== X-Gm-Message-State: AOJu0YwqP6SSyrapwb4Db8bN1ReEnAs0+xn8AUJZ92FClkE67BWW3LHg mzazWs0fhbn8HADrLIudRpLyTgNDegf3v6ST5Kk77Kfujh9/hxZW/DpwyACm39JC X-Gm-Gg: Acq92OG+uJyATC8maxNAXhyN0Vc79tvntQX3Ll0lP9geXwhys3LEmZa1Dm3TLFQqzh0 N+ftjy2axkqk5xFZnboFaqOaZiNS+9BGdLKyXHeCx764xpIUfntm880PhY/6iJtqULLOl5+4Gr+ wMebpTF6SCbc4mwJHB04gm4PrVryOmA+7oXtfKq3qgiNsXT0M+lQt9BnTwbjwZiCEPfjIOamKp8 kbhunIraligBTBtki9J8q4cOyHH5itv1tZiLO/Z3ROmiLR9yonJt3lcmYADfsZisUf/9lJGD3vK 1In9UcvA+WIQvwE/yktj1IT6UcZoRexar1g8mhxJB0z3TMJppw0rvtClrnBOpQdikdcEVT+Nk72 RQArKxX33mgiJ1F2zqYXpqV/DO1aihNraetMO+5q2Ak9vbBRREHtRNj2yokC4KxNCRSvMv2ahVd w9azb4aPJKZCB5yllnXauQhmc5Pw== X-Received: by 2002:a05:600c:4510:b0:489:1c1f:35df with SMTP id 5b1f17b1804b1-490424a682emr24091185e9.10.1779430838488; Thu, 21 May 2026 23:20:38 -0700 (PDT) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH 2/2] docs: Document Arm GICv3 limit for dom0_max_vcpus Date: Fri, 22 May 2026 09:18:27 +0300 Message-ID: <88459940b410ceddc04bca7e2cadf7c16bd5c13b.1779430299.git.mykola_kvach@epam.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-16d1c6/1779430839-7F57ED75-9813E4FE/0/0 X-purgate-type: clean X-purgate-size: 1686 X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1779430856304158500 Content-Type: text/plain; charset="utf-8" From: Mykola Kvach On Arm GICv3 systems, Dom0 may use the host GIC layout, for example when it is the hardware domain. In that case the effective Dom0 vCPU count is not only bounded by the requested dom0_max_vcpus value and Xen's generic vCPU limits. It is also bounded by the redistributor MMIO regions that can be exposed for the host layout. Document that Xen can only create Dom0 vCPUs whose virtual redistributor frame is covered by those regions, and that secondary vCPU creation stops at the first vCPU whose virtual redistributor frame is not covered. Signed-off-by: Mykola Kvach --- docs/misc/xen-command-line.pandoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line= .pandoc index d46d5b2152..0a5589b24c 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -981,6 +981,14 @@ The number of VCPUs to give to dom0. This number of V= CPUs can be more than the number of PCPUs on the host. The default is the number of PCPUs. =20 +On Arm systems using GICv3, Dom0 may use the host GIC layout, for example +when it is the hardware domain. In this case, this value is also limited +by the redistributor MMIO regions that can be exposed for that layout. +Xen can only create Dom0 VCPUs whose virtual redistributor frame is +covered by those regions. If the requested number of VCPUs exceeds that +limit, secondary VCPU creation stops at the first VCPU whose virtual +redistributor frame is not covered. + Or: =20 > `=3D -` where `` and `` are integers. --=20 2.43.0