From nobody Sat May 30 11:21:04 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=1779844902; cv=none; d=zohomail.com; s=zohoarc; b=a205ubwwrJdKSlyxl6e/EfEYRGekRjVfRb46F9GUAXvBhMQLXOSYFLsMeryT44k3lsoctYz6+gWer0UHFtKHJqo1XqkdGeysJFio565+lUe9LVsA7jyetAINJGKwTMN9W3ESDl5GgNeV/iSRjgkXgu1dK/+qafhph3ysySp5/pw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779844902; 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=4vMhWg43N7nYM1IT7U4BDAySY2pGEqFJ6jhyhmB4l4w=; b=jjgOhjmF/3wgNyeqToC+o1ySw4peJxK2IPcTDtZnGosj14NU3PkX+T6kKfm/05XuY/L+tRcIgdFWne16culrUfcBAKlO9EdAN+Rx18KNGtVvhe3MnAoIlTuaGcE9rI9etnYjiEupFNgwB3ALvrZAH9bI+UYf+FWQg76/XYorO6U= 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 1779844902375926.8030187123599; Tue, 26 May 2026 18:21:42 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1320277.1587635 (Exim 4.92) (envelope-from ) id 1wS2xQ-0001jY-OV; Wed, 27 May 2026 01:21:16 +0000 Received: by outflank-mailman (output) from mailman id 1320277.1587635; Wed, 27 May 2026 01:21:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wS2xQ-0001iZ-Hd; Wed, 27 May 2026 01:21:16 +0000 Received: by outflank-mailman (input) for mailman id 1320277; Wed, 27 May 2026 01:21:14 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wS2xO-0001gH-Kt for xen-devel@lists.xenproject.org; Wed, 27 May 2026 01:21:14 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wS2xO-00Cdnu-13 for xen-devel@lists.xenproject.org; Wed, 27 May 2026 03:21:14 +0200 Received: from [10.42.69.10] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a1646e3-5cb7-0a2a0a5109dd-0a2a450a9be6-26 for ; Wed, 27 May 2026 03:21:13 +0200 Received: from [209.85.218.52] (helo=mail-ej1-f52.google.com) by tlsNG-4011c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a164709-56b3-0a2a450a0019-d155da34c1b0-3 for ; Wed, 27 May 2026 03:21:13 +0200 Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-bd4d7f4fa02so1884715366b.3 for ; Tue, 26 May 2026 18:21:13 -0700 (PDT) Received: from EPUAKYIW02F7.. ([45.12.25.69]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bddc5ece286sm550541266b.40.2026.05.26.18.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2026 18:21:13 -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=1779844873; x=1780449673; 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=4vMhWg43N7nYM1IT7U4BDAySY2pGEqFJ6jhyhmB4l4w=; b=efcP6ItTxc7InSUPfYwQg9/Tn3Hrm7BKkuu46ijqrK/mMREnZ1vlz3KBOljTG3/Hu2 eWtPDYSSjGFD5RZxB9/F3r9PaeyZrM5QWKGiJtFgvtInFhGqAEnF+He+8YCA0GzdsIlT EaS2BJF62+GtuoerZRp7lr/7bxJypr/ghIX/mP372vY7vN89+OO1AGgwTzw9cGVZdt9E WVZ/VaKrxsBJ3gdTKVMIcvzrv9mEejWIVCqFe2w0VOTpMs/MSlODFs0+2DM5plfX3AeX DzsmMJ7h5jDVfJsLFoBiJ5bl/Kr6Fqu4GSHl9YmS4/GmIbX38DhrrGAE/LBkE/EhToPx WP+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779844873; x=1780449673; 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=4vMhWg43N7nYM1IT7U4BDAySY2pGEqFJ6jhyhmB4l4w=; b=ZTfA+um8RfxeFYep+ojHCv38nQ2PlRjThDnO6bgxor/FeTSxo1dA7OXqvm9CSguGHD 5TNYNLSwcLVnWcloT+EIi5toSpJC+fFdpfLIOxRCLNqmtKHdjTKWF83v0eNOLtMZ+r5h jA9RkwvLazq97Da1YEeod/0qgUmfue8cORB3R+lC7j17YUJml/5MltUzoUHUHpWlsqnD afiaAxTysbc3ewRRn397MdccJwWb67eax5DC7kntWDbXpSO3tcDkIgh2RwAa/GDXX/Kj szJkVVFmZTOutwcvftm2lnPdWw1nNic3NGU4xECrMkINyVW54Dc5gLVK7bOXNsPGHR/p N0JA== X-Gm-Message-State: AOJu0Yzhd3zt7FC4NsaLsmG5sQkZnYzZY/2i68nFvCcsg1/wFJ3zFg/h w/ESYhFlq1jKvFYPjDqB7CZOYKGycLBeJ5PAZMdaT0sa5hhwJ3fsF66EFAHI3Q== X-Gm-Gg: Acq92OGa7ojJfi/xtfTd8Y5BHlMWb2X1FjYjsGAuuRzY+JvZQmZQ/TLOYyNWjZ9I86U f4JZPFzL+Ji3uYhREiwU2y+15nYJBPor+7Ap4aIctRtD1zEaiycwC1TFfSLobGiB5Y+vmv3rmHA CSbUw/t8s2kwvygTJWwB1KSkY8G//X4BGuF/4cgy+x1jNrTqKVmhbeNesxV9grlGRNaV+QFfDYH h7UaBaC6JZnx5uVpnxH5Bfib5xfiwK5F36c5tTcnDOt/8+1OYCA8RSKJGJWD6ZmToh5XRfnqed5 W5GfROfIA+rM+4AZs7x4RQZHmx7C/PF5fXZtl9JmzzK4jTiY1e/dhsF3RfYHF5s3c1qfbPcR/zO nCwcvcpZvqgt8XrB+kjskvs8DJvXhZReUVuE7IS8DFVOAZvd6xdsOcJjA4R6yK3MFe+Reupm69S 2jL4I5g2rSPTKYufYBCVjIEPJRuPeg1UL/zmB7 X-Received: by 2002:a17:907:1dc8:b0:ba6:e18f:1568 with SMTP id a640c23a62f3a-bdd272cf257mr847459566b.32.1779844873438; Tue, 26 May 2026 18:21:13 -0700 (PDT) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Oleksii Kurochko Subject: [PATCH for-4.22 v2 1/2] xen/arm: propagate vGIC vCPU init failures Date: Wed, 27 May 2026 04:18:50 +0300 Message-ID: <6a422e066c1ee58b81d6c5c15952249572cd13bf.1779840898.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-4011c0/1779844873-7CA798B7-120F01EB/0/0 X-purgate-type: clean X-purgate-size: 5232 X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1779844904988154100 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 construct_domain() policy used by Dom0 and dom0less domain construction: a failure to create a secondary vCPU stops the secondary vCPU creation loop, but does not fail the whole domain construction. 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 Reviewed-by: Michal Orzel --- Changes in v2: - use min(i + 1U, vgic_v3_hw.nr_rdist_regions) when limiting the host-layout redistributor region count. - keep the trailing blank line at the end of xen/arch/arm/vgic.c. - clarify that the best-effort secondary vCPU allocation failure policy is the existing construct_domain() policy for Dom0 and dom0less domains. --- xen/arch/arm/vgic-v3.c | 2 +- xen/arch/arm/vgic.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index 77517c3030..c1c4d6f71e 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -1834,7 +1834,7 @@ 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 min(i + 1U, vgic_v3_hw.nr_rdist_region= s); =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..e5aca17dcb 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++) --=20 2.43.0 From nobody Sat May 30 11:21:04 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=1779844906; cv=none; d=zohomail.com; s=zohoarc; b=S6mwUfaLdvQUbijBkX4KCLx6qZwaTU4ct/PKChkzqCqwk3cU5o/5S45NG+/FT+zyqG3U6xP6GsOzWasKOSAfL7doBgNnsH4QpniC8uAJnU+ybHjwBfpY84ClejXGGgb7dK0Uf9IPnSXSx+kiiQircxaNOSbe7ZC8YiZ3s7b4mbM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779844906; 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=Z5q42x2SOumwV2ISXd6im3oJPw1oUaSthvJnr3rBh1Q=; b=CAUqZvqXA0sPIV2u6LbplFsRxEm1tQpqAwqYEgRnkF5PVQXvOYkPtEyWWlUjd6YNb3maPKHyaDM56RofGWhSm4yPRQ5OBxWcyGclVMp+8TwJ0UUBL+SzjCo25Qc9RVvhazJIb4UcxQbeiheKdmNA5lvcFlIxfB/8974eKZthEKU= 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 1779844906254706.8290697123787; Tue, 26 May 2026 18:21:46 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1320278.1587640 (Exim 4.92) (envelope-from ) id 1wS2xR-0001pQ-0i; Wed, 27 May 2026 01:21:17 +0000 Received: by outflank-mailman (output) from mailman id 1320278.1587640; Wed, 27 May 2026 01:21:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wS2xQ-0001og-Qw; Wed, 27 May 2026 01:21:16 +0000 Received: by outflank-mailman (input) for mailman id 1320278; Wed, 27 May 2026 01:21:16 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wS2xP-0001gS-Us for xen-devel@lists.xenproject.org; Wed, 27 May 2026 01:21:15 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wS2xP-005m8e-BG for xen-devel@lists.xenproject.org; Wed, 27 May 2026 03:21:15 +0200 Received: from [10.42.69.12] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a1646e5-2eae-0a2a0a5409dd-0a2a450cd0b0-16 for ; Wed, 27 May 2026 03:21:15 +0200 Received: from [209.85.218.41] (helo=mail-ej1-f41.google.com) by tlsNG-d25034.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a16470b-62f1-0a2a450c0019-d155da29c42d-3 for ; Wed, 27 May 2026 03:21:15 +0200 Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-bdb3eb93e20so1004846366b.0 for ; Tue, 26 May 2026 18:21:15 -0700 (PDT) Received: from EPUAKYIW02F7.. ([45.12.25.69]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bddc5ece286sm550541266b.40.2026.05.26.18.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2026 18:21:14 -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=1779844875; x=1780449675; 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=Z5q42x2SOumwV2ISXd6im3oJPw1oUaSthvJnr3rBh1Q=; b=XP95W2WPsjBB5oyYiVafiQq1xN4A5yA76kGHaY8jn/vraV/Wf/rrWOqVPv5YURkoyg gxN9ZkmpZaJt3LokqldafztIVMt1n6nfZ1C27tXUy1z66qu+FvCJBGe+JWq1IRl9ZCu+ mycxrTl2OKYMJwaEs77KbV2KXtKI2Z/UI7ghWmP+uCG55eFd+CrZwOE8obATii7Hh0wY JekCpPd4rL7OzfDX3a7rb/DdKpIJVXzgPCcIU78JwA/+nDqlfYeI7lobBzWgXMnzhD27 gOmS5hK9rXJV/bSW5oSjgIr6LyxQbOX7HBBpGHtHUozwXnKXaXX4XUaixEU3sKd3aetc kr4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779844875; x=1780449675; 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=Z5q42x2SOumwV2ISXd6im3oJPw1oUaSthvJnr3rBh1Q=; b=RyMtKhNrQiyqL/iH6+c4Ff4ZT3thH5+eUVys48QznoEN+LS6r0dTUBjJGIXK/fdSTH FCsVacUcPnMCrEr1nkgKGo+jsu2eUtaxuAq0OzkOYSJZwJhrLBgJw6xr9jtlCcgx2Cmh Z4Lzw1/fXA87NEJPfQVIFTddy+qGpBpGU12W2wDbStIZL81wIJFb5b5Z53vmflYruMzt qyaN2Lg/T5VqI9/X5jYgwK21smWOJvBqJ5xXDnKPyhuh/7h3cCW5oPXyQuLOZbiSBJvs 8svjTuJgYAfamwl8p2lQx9lZIkoZNmQ9o/BzWIY4OL7DsNaDR1k4HEhAjZfywbG3mJS8 AnJw== X-Gm-Message-State: AOJu0Yxyp8wQVLND3THxtE3rOQ1e/em3GEyyC1jgVx/77joMKDxU9ow/ KKDsWmPKf1/54g4XffMQGpfRxvuNoIlrL292De9jOZpTp9DoT3zdXUhlFtmZww== X-Gm-Gg: Acq92OER2kEb1hj22r21preg9duwv4QJo3pDfdKvsuzEh+sNOdKkYd8FvgOlriwgqzs rYjGxkw3d2qXABslvhvNoWpppihOStNDnJoc1wJ8VZWqSeKVQZOfkH/XGJP3nFS7ugyWm2um0Oc w+hUjbjaNCKsnWH7wdSTNDusCgjVxbyjO3ehc486W8CCfiw7a2+jSUsatIg8kvPgeOczoKqawtz W0a/EjwQssfATbGABx29MBCQ7uCEOacmyBqWhvBliy9w/lzIDdPt0nBZw/AEWT3vca7SkKo2Fim aGTOOhJdr64cPdjxjfDaiuQ3db8zbB5NDTYwoULyHrgZt1qucVmCVPYVWHAsBp5gHmRFGo9oPcz vMmq37E5MejC879spCgVxaYng4WBjyVQKeYld2ongA7JP+GE6zY8gw0H2cx4B0G6bPra+Hw2LIY 4uCssae+9HxVPVueQQHusJf3+f4B7mdZHD7by4 X-Received: by 2002:a17:907:3e99:b0:be2:cd33:213f with SMTP id a640c23a62f3a-be2cd332452mr350832266b.17.1779844874751; Tue, 26 May 2026 18:21:14 -0700 (PDT) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Oleksii Kurochko Subject: [PATCH for-4.22 v2 2/2] docs/arm: Document GICv3 vCPU limit for host-layout domains Date: Wed, 27 May 2026 04:18:51 +0300 Message-ID: <0799399a712539130dbfced315d5abb8e20137ad.1779840898.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-d25034/1779844875-E0159CF5-CFD08657/0/0 X-purgate-type: clean X-purgate-size: 2620 X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1779844907125158500 Content-Type: text/plain; charset="utf-8" From: Mykola Kvach The number of vCPUs requested for a boot-time Arm domain is not bounded solely by Xen's generic domain limits. For GICv3 domains using the host memory layout, Xen can only create vCPUs whose virtual redistributor frame is covered by redistributor MMIO regions exposed for that layout. This can affect the hardware domain and direct-mapped domains. Document the GICv3-specific limit in the `cpus` property description in the Arm device-tree booting guide. Also add a generic domain-limit caveat to the `dom0_max_vcpus` command-line documentation. Signed-off-by: Mykola Kvach Reviewed-by: Michal Orzel --- Changes in v2: - move the detailed GICv3 host-layout redistributor note from dom0_max_vcpus to the Arm device-tree booting documentation. - keep only a generic domain-limit note under dom0_max_vcpus. --- docs/misc/arm/device-tree/booting.txt | 9 +++++++++ docs/misc/xen-command-line.pandoc | 3 +++ 2 files changed, 12 insertions(+) diff --git a/docs/misc/arm/device-tree/booting.txt b/docs/misc/arm/device-t= ree/booting.txt index f73839df09..bcb06bc796 100644 --- a/docs/misc/arm/device-tree/booting.txt +++ b/docs/misc/arm/device-tree/booting.txt @@ -162,6 +162,15 @@ with the following properties: =20 An integer specifying the number of vcpus to allocate to the guest. =20 + The resulting number of vcpus is still subject to Xen's generic and + architecture-specific domain limits. On Arm GICv3 systems, each vcpu + needs a virtual redistributor frame. Domains using the host GIC layout, + such as the hardware domain or direct-mapped domains, can only use vcp= us + whose virtual redistributor frame is covered by the redistributor MMIO + regions exposed for that layout. If the requested number of vcpus exce= eds + that limit, Xen will create fewer vcpus than requested, stopping at the + first vcpu whose virtual redistributor frame is not covered. + - llc-colors A string specifying the LLC color configuration for the guest. Refer to docs/misc/cache_coloring.rst for syntax. This option is appli= cable diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line= .pandoc index d46d5b2152..8c89b7852c 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -1000,6 +1000,9 @@ For example, with `dom0_max_vcpus=3D4-8`: > 8 | 8 > 10 | 8 =20 +The resulting number of Dom0 VCPUs is still subject to Xen's generic +and architecture-specific domain limits. + ### dom0_mem (ARM) > `=3D ` =20 --=20 2.43.0