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 492B9CD98E6 for ; Fri, 19 Jun 2026 06:09:51 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1341685.1601945 (Exim 4.92) (envelope-from ) id 1waSQ2-0002zI-B7; Fri, 19 Jun 2026 06:09:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1341685.1601945; Fri, 19 Jun 2026 06:09:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1waSQ2-0002zA-7i; Fri, 19 Jun 2026 06:09:34 +0000 Received: by outflank-mailman (input) for mailman id 1341685; Fri, 19 Jun 2026 06:09:32 +0000 Received: from mx.expurgate.net ([194.145.224.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1waSQ0-0002z4-C2 for xen-devel@lists.xenproject.org; Fri, 19 Jun 2026 06:09:32 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1waSPz-00BKB3-0c for xen-devel@lists.xenproject.org; Fri, 19 Jun 2026 08:09:31 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a34dd0b-2eae-0a2a0a5409dd-0a2a4502b268-28 for ; Fri, 19 Jun 2026 08:09:30 +0200 Received: from [40.93.201.5] (helo=CY3PR05CU001.outbound.protection.outlook.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.0) (envelope-from ) id 6a34dd13-fdf1-0a2a45020019-285dc905c8a3-3 for ; Fri, 19 Jun 2026 08:09:25 +0200 Received: from SN7PR04CA0021.namprd04.prod.outlook.com (2603:10b6:806:f2::26) by CY5PR12MB6646.namprd12.prod.outlook.com (2603:10b6:930:41::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.139.11; Fri, 19 Jun 2026 06:09:16 +0000 Received: from SN1PEPF000397B2.namprd05.prod.outlook.com (2603:10b6:806:f2:cafe::27) by SN7PR04CA0021.outlook.office365.com (2603:10b6:806:f2::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.139.13 via Frontend Transport; Fri, 19 Jun 2026 06:09:16 +0000 Received: from satlexmb07.amd.com (165.204.84.17) by SN1PEPF000397B2.mail.protection.outlook.com (10.167.248.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.139.8 via Frontend Transport; Fri, 19 Jun 2026 06:09:15 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Fri, 19 Jun 2026 01:09:15 -0500 Received: from satlexmb07.amd.com (10.181.42.216) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Fri, 19 Jun 2026 01:09:15 -0500 Received: from [10.71.196.80] (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Fri, 19 Jun 2026 01:09:13 -0500 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=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tG7SqUDJQlQh3R1v1vBC3LQbndB8NFDNWDkJwC5v94WoeKGCR4sym6++z4mdPD9o/XA7wHBl4Xw+KUyGy6JtNQLIC2BRe879ZVl7tqJ3sM67wU4BkCXNUW7IFsMqFY2K4+C1bv8AbiPC1O/1RoOJGPHOsQ7n2OMgGVK3nUszk0wB6RzYKKDIEwyXBp49S1XtTjzEE6IDRqbua45O/wuG4EPuuTrFQmObFhDTA0sKEFTjPYk7K578eVrtRKNsgeYqDtB1CAYZAcSHNTxmKmtMYROv+dW+opbFSG+GJ30+axmGUyBQ6WFV8SeMkJtFkASC2DSKAKv0yhb+QaiUPU9y1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Woyuh5skBkAG4+lxLY5ewg4jVeiU4PUKSuZlis341MM=; b=njO0pzeNb4AsBJVqX83xmjg29zJ45nfcN/Cm8go2nOD/J+EF0cPgUwA/CrLskTZ/vvhHhFYBiw64eLT5Aon4TWGQtHWI0QGxgJzxvAQUtbDwoigOiwA8AhRI73BlflxhzAFaIazfJXCQjS5eq+ChBsWjDyWtFyYiqQB5ZXnrVpnqeBhsdANtZm3ytYkwzjEujha58XGkJgxgbnL3lpsvdv7+hg6CX/osawKSlrkVxOBuHFiFcoNQZQopHv6bYeB5VLjfvM5iMQQV8MIe5oqajAV2v7e5LTpJWpyn3ZWah5p4+FG64OV7FKrRoN6VUrmYj61JLEyIlITIRd8ATiCQ6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.com 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=Woyuh5skBkAG4+lxLY5ewg4jVeiU4PUKSuZlis341MM=; b=VWxer//nzlE2fiDtg3Jv1U/Oi9/JX9YAyIF7VrSerD+Y37opJHHr7YwwpvRUCeL0LJ/lg+ztYYoFMoWOFaTK0zWFSmDv85/dcafln/QphZAEVjROb9Y4nE4B+wV/pIGthBFI7HRiocTfx1V5IVtDSeHY5BJTq7/H5zxr4JuNrrU= 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 (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=satlexmb07.amd.com; pr=C Message-ID: <7a0a1867-8316-4e20-971e-fab99c9f4a32@amd.com> Date: Fri, 19 Jun 2026 08:09:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH for-4.22 v2.5] xen/arm: gic: defer host LPI allocation until after ITS init To: Mykola Kvach , CC: Stefano Stabellini , Julien Grall , Bertrand Marquis , "Volodymyr Babchuk" , Oleksii Kurochko , Luca Fancellu , "Mykola Kvach" , Oleksandr Tyshchenko References: <112419d3ea48ca328849c8f6647909d3eb667b40.1779922874.git.mykola_kvach@epam.com> <341edd8de63dcd84ccc6e7b6c03e9e8fc7105184.1781847061.git.mykola_kvach@epam.com> From: "Orzel, Michal" Content-Language: en-US In-Reply-To: <341edd8de63dcd84ccc6e7b6c03e9e8fc7105184.1781847061.git.mykola_kvach@epam.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000397B2:EE_|CY5PR12MB6646:EE_ X-MS-Office365-Filtering-Correlation-Id: a9a7149f-0e7e-4c55-5ea4-08decdc94aa1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|23010399003|36860700016|82310400026|18002099003|22082099003|4143699003|3023799007|56012099006|11063799006|6133799003; X-Microsoft-Antispam-Message-Info: NwRwLj2OrDQfG3uC+KtQGya/ahD5OLcNkOMo3IupPBDR5JNFdGTVwapEQmmsw/uFz2ExbJL33T6MNk9BWzoeGBLfZWGIcAZPni3HpT9ftUkdp0M3/ti5lfO05pdSmr7ZIzuxMkZrKvY1JLYGd2W2Qbvq4/FfW4c4m2gKcANWuxaDNBjYQsPmosp1Ff0uGuwUUkE2aAeK5N/A+tQbNM5oO+I6xqvdhFuiJcuVhfVKBoq+kcpmU39DBHL0k1o+t9CV0Qng854+JfdL6aVHlN8G2vCZELISo0PqeY183TTn4xnuKijWNtEfqnu9SmQPecU0WhoOg5JKSYKX0ZxzM2pfjUOf2MqoTqFjXd0cRnnZMY7M0uyRYk9dYuuK2R6kFsIHrEI7cK1dCVY+BoWLguAJv0cAY0F5gqiY3zr2+TSnna2+Ws5weX3dOBj0QxiK6RYZDJpaxkS5eRE2ETbemSgVx96c2VC6tOec/pDXYv6uf1exA/X635JAmZEAMZObF1zMbB6y3hzawf+s8kd/l481WdWZHdZc/YQIeVxzJIbGkoNHtFkJLHzvF6sklEAWNh6WM+Ck0gAoM2JLycksSb/7PPG9K0dDw5yPiI5J5CafJNFOEG/vkKR0d9OwGxe61m470t238PrzdfhecKKXy5PX5YEwkBsVPTIoyb6sEsaNl5Mui3+Ef9HqfDScwteQfbjMTwcLMEuEc+gjsWZ/q6M7XQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(23010399003)(36860700016)(82310400026)(18002099003)(22082099003)(4143699003)(3023799007)(56012099006)(11063799006)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IIUL3K6GWl2kIAoAbDnBjDzLUBNH9gOgQkE3RrJV16iD/ZMVAaXHmTKeQgytXW1FfZdDXKgxeKogcruhArweJUqS0s2qH/Pr2Zfx4qqwv9KX0eGYCFJMpcDIcPHz8bmbTioulgLTBDT7K3XILOpNn1YvsqfI5GVXcc1kGexCHVgObD4hpgxI9+4/zll0WNvqM+KuQQ91Q27wyEl05VMTnneW6bsYKm66zjc2gVMWA+J9xUsP2plPBJ1UzVHENMnrPpDBaLUNhQlZXVoHpuAcs9DoXaeoZkFH9eLGk57FTUKfbP9oQ8cFhcX/UC1SDvidknoZ8mSFHYFC1XiiqKXX0xBHyrVFhthVsGLvgSCQtpdHMT5X7f1s6MkgkP1dN/e5d2p1DcA41qoSRj1e8ct33MYMK86axoek4hFcKmp8+FQQIpRuYz3KcEYf9GD9//Nn X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2026 06:09:15.7084 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a9a7149f-0e7e-4c55-5ea4-08decdc94aa1 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=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF000397B2.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6646 X-purgate-ID: tlsNG-720697/1781849366-4767B3F3-510B7959/0/0 X-purgate-type: clean X-purgate-size: 1699 On 19-Jun-26 07:45, Mykola Kvach wrote: > gicv3_lpi_init_host_lpis() allocates host LPI state, including the > host LPI lookup table, CPU notifier state and the boot CPU pending table. > Those allocations use gicv3_its_get_memflags(). > > ITS quirks are discovered by gicv3_its_init(), so allocating host LPI > state from gicv3_dist_init() can happen before the memory restrictions > required by the ITS are known. On affected systems this can leave > Redistributor LPI state allocated and programmed with the default memory > policy. > > Move host LPI initialization after gicv3_its_init(), and only run it when > a host ITS was found. The old call ignored the return value. Now that the > call is made from gicv3_init(), check it and panic on failure because > Redistributor LPI initialization relies on that state being available. > > This also narrows the condition for host LPI initialization from > "GICD advertises LPIs" to "a host ITS was discovered". This is > intentional: Xen currently has no supported LPI path without a host ITS, > and gicv3_lpi_init_rdist() already rejects that case with -ENODEV. > Therefore, on systems where GICD_TYPE_LPIS is set but no host ITS is > present, skipping gicv3_lpi_init_host_lpis() only avoids allocating host > LPI state that cannot be used by a supported Xen LPI path. > > Fixes: dcb6cb263689 ("ARM: GICv3 ITS: introduce host LPI array") > Fixes: 751ec850ec1d ("ARM: ITS: implement quirks and add support for Renesas Gen4 ITS") > Signed-off-by: Mykola Kvach > Reviewed-by: Oleksandr Tyshchenko Reviewed-by: Michal Orzel ~Michal