From nobody Mon Sep 16 19:03:49 2024 Delivered-To: importer@patchew.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; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1720079687; cv=pass; d=zohomail.com; s=zohoarc; b=OKyKOezowLUglKJx8JgK1GqJxCSQEc3I44NjlOE06xxmnsVxPRyScyy5m4bHlgFak1wvatGrp4Di6BNQiSiD/ZKzj15Qj4v0eBKJCMX2VjRuant7epHDVFPJFVyJLkqANiguhyMwTpNrgZAdhFJ69P6/JxDBCdgEZgfj9DD9qVU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1720079687; h=Content-Type:Content-Transfer-Encoding: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=Cn0TjFAKHF8HGar+yx4yKFzfxkU7wFq9wqkb/IYEq0o=; b=n5iZ8pxPPLf8X5q7XYAySGNOXvSF4Pl2YIUBEnW96PFpDhRefmSHPwiGd48eS2doJS9n63mu0cR15z2aMT035nkvIbBXbXZBcEkuv1pjzvlzDTG+l9DfMHLpmX2Vxonf9w6cBm2dyu3+hfG8UUhuxhfyMrw+PNd/v9RMzzkfKdA= ARC-Authentication-Results: i=2; 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; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1720079687065959.8586889340071; Thu, 4 Jul 2024 00:54:47 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.753577.1161767 (Exim 4.92) (envelope-from ) id 1sPHIW-00055I-0v; Thu, 04 Jul 2024 07:54:32 +0000 Received: by outflank-mailman (output) from mailman id 753577.1161767; Thu, 04 Jul 2024 07:54:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPHIV-00055B-UC; Thu, 04 Jul 2024 07:54:31 +0000 Received: by outflank-mailman (input) for mailman id 753577; Thu, 04 Jul 2024 07:54:30 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPHIT-000555-TQ for xen-devel@lists.xenproject.org; Thu, 04 Jul 2024 07:54:29 +0000 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on20614.outbound.protection.outlook.com [2a01:111:f403:200a::614]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a2cecf28-39da-11ef-bbf9-fd08da9f4363; Thu, 04 Jul 2024 09:54:28 +0200 (CEST) Received: from BL1PR13CA0023.namprd13.prod.outlook.com (2603:10b6:208:256::28) by PH7PR12MB8825.namprd12.prod.outlook.com (2603:10b6:510:26a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.29; Thu, 4 Jul 2024 07:54:24 +0000 Received: from BL6PEPF00022570.namprd02.prod.outlook.com (2603:10b6:208:256:cafe::32) by BL1PR13CA0023.outlook.office365.com (2603:10b6:208:256::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.8 via Frontend Transport; Thu, 4 Jul 2024 07:54:23 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF00022570.mail.protection.outlook.com (10.167.249.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7741.18 via Frontend Transport; Thu, 4 Jul 2024 07:54:23 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 4 Jul 2024 02:54:22 -0500 Received: from XIR-MICHALO-L1.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 4 Jul 2024 02:54:21 -0500 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" X-Inumbo-ID: a2cecf28-39da-11ef-bbf9-fd08da9f4363 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QaDRFcVD2YSMincS0EwP3v0FhY4sn4VMuhaIHoaD7bypT37aHrCL4N+qf3UmgpBLn/ZlWbl4j652jiEMlS3z8F+Z4oRJvrrqT5IgTlPUW/hp3t4pMEWcZHy55hQqWYjAtpdjcEcLJ0amQh4CAw+1D5jWVNyICnlmyl0Z4OX36OW/D0IRfjJICxLOuW69vmYte+nbKbkPCC2TljerpGZT2yauIdp5UDPqACBzH7QtoRcUAn88GH2TiOSsbZv9/1jTRZ4AMqXZjPiUlpbFvLzt/hnVEwOYu9iD9rf3BFUXHHr3nYeOvhR11ifo7IN/sjkVu+qzacHpMlSsgWGfA2ueag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Cn0TjFAKHF8HGar+yx4yKFzfxkU7wFq9wqkb/IYEq0o=; b=jsrX9pxiAUCkBMsVQKUfLvsF1eqf3BdJgNv99FIjw9eQF4Zv7nniPq+JDQpmEaEcvfWny12nYatjg81QTQp7hpqQK7VjQIi4ssrLZXNd/ZAkEebSJJTP50OOYATTCj7fRO/SKKyOKZ+FOjCBysh3p+fMtowhEwRYlI5gTu5W+ovJ9MkCfX1h7KYmky3UtV5MeeVdA/c9m7m2Pu4+Ir/nW8ma9j8pFyTqLUWoaFr7sGDHw77cubLg1vQSVoxLRrmC/NTnKwnLpAGZ4sCTWby7PCxCOTQZqbgJUMcaKgzbO9KeNpPchJnPd5P7xQ+i9GmhyytYJgfZ2e3qpOkl3AqSWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cn0TjFAKHF8HGar+yx4yKFzfxkU7wFq9wqkb/IYEq0o=; b=nSdTPfNn7MuSHNV7A4iN0jE+OnSztP6+WyWatdL/ZMrvizl6uL5Vkt14uELf7xhAIHg9+FH/7e49aQHuNVIjHd/U4hJmquESFtcTmIjKvnqmMEZrdYOal66hUYpgr/Gwngz/B8VBP8TYS1TieUzcFGarM0c5QbpLvQ4RKv+AdH8= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; 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; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C From: Michal Orzel To: CC: Michal Orzel , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [PATCH for-4.20] xen/arm: dom0less: Add #redistributor-regions property to GICv3 node Date: Thu, 4 Jul 2024 09:54:19 +0200 Message-ID: <20240704075419.34966-1-michal.orzel@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: None (SATLEXMB04.amd.com: michal.orzel@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00022570:EE_|PH7PR12MB8825:EE_ X-MS-Office365-Filtering-Correlation-Id: f350c216-bbb5-40a0-efb5-08dc9bfe84e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?PUr3hA9CYk7APx55LE9dCVWZQ+dCaCgEw0NjSn+q0qyKbiB+XA5mtqYmS5dn?= =?us-ascii?Q?I3HpPpDv5F1slwqEQnkH168sadGUkV495ky8k76SCixjPfIQ0PPhEorcxzh7?= =?us-ascii?Q?GEgqWmzVIvBfxrXelohnIu+aEgG+rQMg7jbJ5StwTyWav1/7dGXtXAu5+f1a?= =?us-ascii?Q?5DPZ0CD/5CYlGc24Qcp7J2m3wnB8KFIbsFVpBACkEPVdWKMEF7DqvUxzSalh?= =?us-ascii?Q?dXYqrZTBbN7lPvEtOk1QWu+O7vJa/pzIx7Xq/yAiH0+FvqJypFZ/QwRONH7g?= =?us-ascii?Q?o0qIPmmmQ3BaWAD9R+T66Gdr26eGdM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q?qvvomIAStA0mVOPSW5jLFSMohF45+qjiBAmC+DQSDOzDT4bS6VRVVMKp08oY?= =?us-ascii?Q?u8ekmihSpNiDdWWApvePFbwd6I+bWilSidilkB2yrprvGeYDj9TDuBV2lioe?= =?us-ascii?Q?gAS+30ISNzVuyOJMDuUYpRCmam3twafEHKWhF2+J48K8C10KqVQxiH4iYo4K?= =?us-ascii?Q?YbjrLdpilNReAskvOsp2JAO7q2iAeJuSgPJJuPFr+uJrAz+h3y1wVyhOeBqa?= =?us-ascii?Q?Dho5uuaaY31BfPOpOledcyspWXWeup0x?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2024 07:54:23.2555 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f350c216-bbb5-40a0-efb5-08dc9bfe84e6 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00022570.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8825 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1720079688466100001 Content-Type: text/plain; charset="utf-8" Dom0less domain using host memory layout may use more than one re-distributor region (d->arch.vgic.nr_regions > 1). In that case Xen will add them in a "reg" property of a GICv3 domU node. Guest needs to know how many regions to search for, and therefore the GICv3 dt binding [1] specifies that "#redistributor-regions" property is required if more than one redistributor region is present. However, Xen does not add this property which makes guest believe, there is just one such region. This can lead to guest boot failure when doing GIC SMP initialization. Fix it by adding this property, which matches what we do for hwdom. [1] Linux: Documentation/devicetree/bindings/interrupt-controller/arm,gic-v= 3.yaml Fixes: 4809f9ec7d71 ("xen/arm: if direct-map domain use native addresses fo= r GICv3") Signed-off-by: Michal Orzel Acked-by: Julien Grall Reviewed-by: Luca Fancellu --- Tested with Qemu 8.2, virt machine with nr cpus > 123 which requires to use= a second redistributor region. --- xen/arch/arm/dom0less-build.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c index f919d3acf976..09b65e44aed3 100644 --- a/xen/arch/arm/dom0less-build.c +++ b/xen/arch/arm/dom0less-build.c @@ -176,6 +176,11 @@ static int __init make_gicv3_domU_node(struct kernel_i= nfo *kinfo) if ( res ) return res; =20 + res =3D fdt_property_cell(fdt, "#redistributor-regions", + d->arch.vgic.nr_regions); + if ( res ) + return res; + /* reg specifies all re-distributors and Distributor. */ len =3D (GUEST_ROOT_ADDRESS_CELLS + GUEST_ROOT_SIZE_CELLS) * (d->arch.vgic.nr_regions + 1) * sizeof(__be32); --=20 2.25.1