Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D128606A322 for ; Fri, 4 Dec 2026 07:15:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=VoCf0BGm Received: from list by lists.xenproject.org with outflank-mailman.1513755.1705235 (Exim 4.92) (envelope-from ) id 1xZNWH-0001ik-FI; Fri, 04 Dec 2026 07:15:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1513755.1705235; Fri, 04 Dec 2026 07:15:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xZNWH-0001ib-Ac; Fri, 04 Dec 2026 07:15:49 +0000 Received: by outflank-mailman (input) for mailman id 1513755; Fri, 04 Dec 2026 07:15:48 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xZNWG-0001h2-2w for xen-devel@lists.xenproject.org; Fri, 04 Dec 2026 07:15:48 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1xZNWF-00EsiH-FQ for xen-devel@lists.xenproject.org; Fri, 04 Dec 2026 08:15:47 +0100 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6b12689f-2eae-0a2a0a5409dd-0a2a4504c522-12 for ; Fri, 04 Dec 2026 08:15:47 +0100 Received: from [52.101.48.32] (helo=MW6PR02CU001.outbound.protection.outlook.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6b1268a1-b57f-0a2a45040019-34653020799a-4 for ; Fri, 04 Dec 2026 08:15:46 +0100 Received: from BN9PR03CA0196.namprd03.prod.outlook.com (2603:10b6:408:f9::21) by CH1PR12MB9648.namprd12.prod.outlook.com (2603:10b6:610:2b0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.11; Fri, 4 Dec 2026 07:15:37 +0000 Received: from BN1PEPF00018073.namprd04.prod.outlook.com (2603:10b6:408:f9:cafe::12) by BN9PR03CA0196.outlook.office365.com (2603:10b6:408:f9::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.13 via Frontend Transport; Fri, 4 Dec 2026 07:15:37 +0000 Received: from satlexmb08.amd.com (165.204.84.17) by BN1PEPF00018073.mail.protection.outlook.com (10.167.245.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.709.6 via Frontend Transport; Fri, 4 Dec 2026 07:15:37 +0000 Received: from Satlexmb09.amd.com (10.181.42.218) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Fri, 4 Dec 2026 01:15:34 -0600 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb09.amd.com (10.181.42.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Fri, 4 Dec 2026 01:15:34 -0600 Received: from [192.168.31.141] (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.57 via Frontend Transport; Fri, 4 Dec 2026 01:15:33 -0600 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Post: List-Help: List-Subscribe: , 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=xSH0KoukZwFY78kDQAaWLN99UiLMNPjF8Oky7PiJtToR1Mf4oS/zU645ptgO8uExDMQbFTNadGoo11DpSlSGMvAChr4O/eXrvIa2+VDTIDkXp/nZbMY9MB1V4ai/E3ZkhcFnFReva4H7V2CtH/Y5KzGkwvwd3E9aGDM3Lr0468IfA1daZktJZJvZBLjkNjAnqJMkJhKtajQD2fJIIkjul/okLpwrE4RmrDFvz4X3Jjm5r1dHrEUV0SEUkhNZ85mu8H6NmnHMNVDfUvVqjeU3TqMYkMKw/SP1Vef7sUpug8KoM+xoO3qe5C0YacYxxzakF2E80RFGsGEoK1Fxf+DzGw== 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=DCuuO8M/HdS1tacD0yP97IEvO3HN+XCHNixdBjreKC4=; b=LFbUYLschB10vhAcwe2cG3mSZ4nYRPWfvt0pywDeh5tq1znVhtBQQqrVffsdoqUBGumQKAB8zEEywlaIHyw2ryOjRrnB4AA6nss14KF+S040jng7llKx4t2Y9ZD5rBM6svMcXSm2W8c7Uv1ZYfrQxwEoFg76vrqP2TZMFnKccIoJ7G55KYUifGfBUjX0ofIGltD31tov4IOpIza2ZmDVw2KDaOlGQyAXSVJz/ppAyIacP3kvzhOjbM93KiBGwWvliIA/HxYAihoQ3rb9dnKrGsT4vTlAqCaH2CHsn/vNHqc5qIOze63SLOOGdsJVGq+6WAiBgjtuCCjjXcGcFDyY7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=oss.nxp.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=DCuuO8M/HdS1tacD0yP97IEvO3HN+XCHNixdBjreKC4=; b=VoCf0BGm3xkImYJ1P5zkUcnU0tqRqmFir58qxzI0L6kInKSnfDLHpUg19husTZy32ha9Jcwa1fKrxMKpZD7zRCksVsxa/lIonfJEjcpJOZHyJEENEqulE5KNyMgeyZIl9cSJ9jb3JXTt82nbQ655NWY5ZpJm7UKfltlIYpM/IRs= X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; 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=satlexmb08.amd.com; pr=C Message-ID: Date: Fri, 4 Dec 2026 08:15:26 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] xen/arm: fix spurious SMT warning on CPUs with MT=1 encoding convention To: "Peng Fan (OSS)" , CC: Stefano Stabellini , Julien Grall , Bertrand Marquis , "Volodymyr Babchuk" , Peng Fan References: <20261204-a55-mt-v1-1-35ccb255cb13@nxp.com> From: "Orzel, Michal" Content-Language: en-US In-Reply-To: <20261204-a55-mt-v1-1-35ccb255cb13@nxp.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00018073:EE_|CH1PR12MB9648:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d1a6b59-8f57-4f56-f074-08df51d66530 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700016|23010399003|376014|1800799024|11063799006|6133799003|261009223027099003|13003099007|22082099003|10067099003|56012099006|261026121527099003|261102123227099003|261021121427099003|261028144727099003|261026140227099003|261021123027099003|261022105027099003|18002099003; X-Microsoft-Antispam-Message-Info: aSFFWQxQFuazxLpybl1dbgwcupQYn+h0kZjBiodxKFHfAp/plSl/kr461SxFi4RWmsd3/oiYYkMcDROoF1AO/HqAVnqtkMpYv0+Lo1uxksJa5ERH9Gx14knHl1vearOt7msqathhaj7QrL2AyGOOxbcNzB0xl+bx0+1Mje8LH9+hv7G6qNBSUucig8bFQoRv9j3cvo+y17KGFOdW5k/v6gBkTeYLGHn3iGdDGYWLmO9jYTY/uIT5hxDNiMy7T62bkt40PsRpZo6dpnbJBKqgLERMYkbtM8EyIdm3SMQPgaQCk07rf0eTlO5gCYZcMOFFpOpmJ+9ZeFMU5UoMy5j8hQnr2naqw6tnjIXrQ7kPSXlG66K0A4RO2q8ofGoJilmvMIz5GZHaThFLyHhDh16HS1sqyaaxLIKFB7dPq7YBrzdOewyZC1KB5dqbtdxaCQW7YJ5YZk3WO/PvY1m805bZBx4E/nin9u6691/0Dp0NVNQd/VcM49gAiA4RHbupJqmOR1E45/6sUMeHvqqKsNXxGFTQhS6MBl8K75qFPdWsAoGS9e29rrcrkiFsupu2nEqVg203L4Wn5DGjpd5mkdx4JSyP05rJ3iyvcweVPgYLddT+73PErg0Lrone2XOa29cTdQPUtz4+X1zNlmT4AtauQemQbbgFXyVQcCmB/txYSFc= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb08.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(23010399003)(376014)(1800799024)(11063799006)(6133799003)(261009223027099003)(13003099007)(22082099003)(10067099003)(56012099006)(261026121527099003)(261102123227099003)(261021121427099003)(261028144727099003)(261026140227099003)(261021123027099003)(261022105027099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FYYKUyvBzmArxjwdjsT8SH1Hg31mxQZJ7V+hb+d4XjGn1fKBn9eGt2+rH2US+hR8nIEso/B2Fv058LyAAxpFHCr81yDuc+INEZ9CrZtYbCOl/pkEmn1D9+Us3oROKs6/Tpn7iZReAnetGyzSNyc+eFEdl9bGn00+AoPK+OPRy+NQ0ZrgmDjMqPh/HgaSSuwTya/zlqdtFoORQaZLwv4J7XdG3eAr51mefNj4l86up/3aAKmYsN9122LLwfp+orLqOAq7UynJlD8ciQBWD3dAUh2cXbhGma4XdPSx4azBU+E1/5a9Ychbt+TCo+4Bc/W5AqBhrB6gkGOyyV2R/Ja91RxVn2rCYl9FNUXStELwLr+kTjSXNcj8314XZYVBqf4kow+ABGRMOs+v8Kjw3wdLdGk43l6slRYOfblZwHswQxGUcsOL/xkvtZvQNBgS23IZ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2026 07:15:37.2033 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d1a6b59-8f57-4f56-f074-08df51d66530 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=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00018073.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH1PR12MB9648 X-purgate-ID: tlsNG-ebf023/1796368547-51ED6B50-A16A8F90/0/0 X-purgate-type: clean X-purgate-size: 3310 X-Spam-Status: No, score=-17.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 04-Dec-26 01:58, Peng Fan (OSS) wrote: > From: Peng Fan > > Some ARM processors, such as Cortex-A55, set MPIDR.MT=1 as a topology NIT: Some is underselling. A lot of modern ARM CPUs set MT=1 but do not use SMT. The only CPUs using SMT are Cortex-A65 and Neoverse-E1. > encoding convention to indicate that Aff0 represents thread IDs, without > actually implementing multithreading (SMT). This caused Xen to > unconditionally emit a security warning and incur a 3-second boot delay > via warning_print() on all such platforms. > > Fix the detection by verifying that at least one CPU has a non-zero Aff0 Add "also verifying" so that it's clear that the .MT bit check is still in place > affinity level in its cpu_logical_map entry. A non-zero Aff0 is the only > reliable indication that multiple threads share a physical core. Platforms > like Cortex-A55 where all CPUs have Aff0=0 will no longer trigger the > warning. A few days ago I mentioned this issue and that is should be fixed while reviewing this patch: https://lore.kernel.org/xen-devel/fd3e03ab-d06d-4e81-b196-e75fcdd21ca5@amd.com/ Was this perhaps the input for this patch? > > Signed-off-by: Peng Fan > --- > xen/arch/arm/smpboot.c | 27 ++++++++++++++++++++++++--- > 1 file changed, 24 insertions(+), 3 deletions(-) > > diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c > index 2fc6c36ca1d3..05fab1fe5174 100644 > --- a/xen/arch/arm/smpboot.c > +++ b/xen/arch/arm/smpboot.c > @@ -309,9 +309,30 @@ void __init smp_init_cpus(void) > "It has implications on the security and stability of the system,\n" > "unless the cpu affinity of all domains is specified.\n"); > > - if ( system_cpuinfo.mpidr.mt == 1 ) > - warning_add("WARNING: MULTITHREADING HAS BEEN DETECTED ON THE PROCESSOR.\n" > - "It might impact the security of the system.\n"); > + /* > + * MT=1 means Aff0 encodes thread IDs, but some CPUs (e.g. Cortex-A55) > + * set MT=1 as a topology encoding convention without implementing SMT. > + * Only warn if Aff0 is non-zero for any CPU, indicating real threads. > + */ > + if ( system_cpuinfo.mpidr.mt ) > + { > + unsigned int cpu; > + bool real_smt = false; Do we need this variable? We could call warning_add and break right away. > + > + for_each_possible_cpu ( cpu ) No need for extra spaces. It should be for_each_possible_cpu(cpu). > + { > + if ( MPIDR_AFFINITY_LEVEL(cpu_logical_map(cpu), 0) != 0 ) > + { > + real_smt = true; > + break; > + } > + } > + > + if ( real_smt ) > + warning_add("WARNING: MULTITHREADING HAS BEEN DETECTED ON THE PROCESSOR.\n" > + "It might impact the security of the system.\n"); > + } > + Stray blank line. > } > > unsigned int __init smp_get_max_cpus(void) > > --- > base-commit: a1bb3efd35c2ea04c861f53df602795abb52038a > change-id: 20261204-a55-mt-e5950b5392ef > > Best regards, > -- > Peng Fan With the remarks addressed: Reviewed-by: Michal Orzel ~Michal