Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01CB3CD5BD2 for ; Wed, 27 May 2026 01:21:41 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1320276.1587629 (Exim 4.92) (envelope-from ) id 1wS2xQ-0001gg-EQ; Wed, 27 May 2026 01:21:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1320276.1587629; 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-0001gZ-Aq; Wed, 27 May 2026 01:21:16 +0000 Received: by outflank-mailman (input) for mailman id 1320276; 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-0001gG-Db 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 1wS2xN-00B6JG-Bv for xen-devel@lists.xenproject.org; Wed, 27 May 2026 03:21:13 +0200 Received: from [10.42.69.7] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a1646ea-e002-0a2a0a5209dd-0a2a45078a68-22 for ; Wed, 27 May 2026 03:21:13 +0200 Received: from [209.85.218.45] (helo=mail-ej1-f45.google.com) by tlsNG-ef75cf.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a164709-229c-0a2a45070019-d155da2de053-3 for ; Wed, 27 May 2026 03:21:13 +0200 Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-bd01481e592so1555400566b.2 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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2026 18:21:12 -0700 (PDT) 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: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:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rZBAxVK5rUdy7lBSH0quiPGXRXut68rQ9vHGC1gb/6Y=; b=OQY0j1WXAaxilTEglP2AC8y1IMCMVA1GgsFnlC5bdGwNqD8zZw0m0jJBQfts0jFee2 /SP3lf41FK0tvLuZDVx81TDcL+vly3iWagz9zuVnRvhSb6YsbEp7TJph4stPfvt953IC HljfZdd0gUqTVchK335BUBolFQUrAdOQuSQ1U6SEc07VwHQtiQvulDIRjhzTQWpJT4Cd UlMMr1ip/PIRykJGfVWv21DPX4UhUorZr8+ji+pfCSegLmIK2IN0OweIaMVz5I38dSfg b5BEWMCzh2KMgVOCnxZFmrju6Lz+cj+XZPf0u6m766rKhh20nRSJpbl9sbOUEDkFsSHZ +QEQ== 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:message-id:date:subject:cc :to:from:x-gm-gg:x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by 2002:a17:907:3e03:b0:bd8:6ac6:d722 with SMTP id a640c23a62f3a-bdd25cecef9mr1216612266b.24.1779844872631; Tue, 26 May 2026 18:21:12 -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 0/2] xen/arm: handle vGIC vCPU init failures Date: Wed, 27 May 2026 04:18:49 +0300 Message-ID: X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-purgate-ID: tlsNG-ef75cf/1779844873-0A971C48-801E5C30/0/0 X-purgate-type: clean X-purgate-size: 2343 From: Mykola Kvach This series fixes two related GICv3 host-layout issues exposed when a boot-time domain requests more vCPUs than the guest-visible redistributor MMIO regions can cover. For domains using the host memory layout, Xen exposes GICv3 redistributor MMIO regions based on the host layout. Each vCPU needs a virtual redistributor frame covered by one of those regions. On FVP with a 2 MiB redistributor region, only 16 128 KiB guest redistributor frames are covered; a request for 64 vCPUs leaves vCPU16 and above without a corresponding redistributor frame. The vGICv3 per-vCPU init path detects this and rejects the first uncovered vCPU, but the generic vGIC init path ignored that error. As a result, vcpu_create() could succeed with invalid per-vCPU vGIC state, and the guest could observe more possible CPUs than Xen can back with emulated redistributors. There was also an off-by-one in the host-layout redistributor region count when all hardware regions had been consumed. That could make Xen describe a guest-visible GICR MMIO region beyond the populated redistributor region list. A guest access to that exposed window would then fail to match any emulated redistributor frame. Patch 1 fixes the vCPU creation path by propagating per-vCPU vGIC init failures, and also fixes the related host-layout redistributor region count so Xen does not expose an unbacked GICR window. Patch 2 documents the resulting Arm GICv3 host-layout constraint for boot-time domains and keeps dom0_max_vcpus documentation generic. Changes in v2: - use min(i + 1U, vgic_v3_hw.nr_rdist_regions) for the host-layout redistributor region count. - keep the trailing blank line at the end of xen/arch/arm/vgic.c. - move the detailed GICv3 host-layout documentation from dom0_max_vcpus to the Arm device-tree booting documentation. - add Michal's Reviewed-by tag to patch 1. Mykola Kvach (2): xen/arm: propagate vGIC vCPU init failures docs/arm: Document GICv3 vCPU limit for host-layout domains docs/misc/arm/device-tree/booting.txt | 9 +++++++++ docs/misc/xen-command-line.pandoc | 3 +++ xen/arch/arm/vgic-v3.c | 2 +- xen/arch/arm/vgic.c | 9 +++++++-- 4 files changed, 20 insertions(+), 3 deletions(-) -- 2.43.0