From mboxrd@z Thu Jan 1 00:00:00 1970 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 D62F6606A327 for ; Tue, 1 Dec 2026 13:21:10 +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=AErhw6WK Received: from list by lists.xenproject.org with outflank-mailman.1508581.1701484 (Exim 4.92) (envelope-from ) id 1xYNmu-000634-OQ; Tue, 01 Dec 2026 13:20:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1508581.1701484; Tue, 01 Dec 2026 13:20:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xYNmu-00062x-Jt; Tue, 01 Dec 2026 13:20:52 +0000 Received: by outflank-mailman (input) for mailman id 1508581; Tue, 01 Dec 2026 13:20:50 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xYNms-000622-Mc for xen-devel@lists.xenproject.org; Tue, 01 Dec 2026 13:20:50 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1xYNmr-007yfR-K9 for xen-devel@lists.xenproject.org; Tue, 01 Dec 2026 14:20:49 +0100 Received: from [10.42.69.1] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6b0ec9a8-8faa-0a2a0a5109dd-0a2a4501caee-36 for ; Tue, 01 Dec 2026 14:20:49 +0100 Received: from [52.101.43.1] (helo=SJ2PR03CU001.outbound.protection.outlook.com) by tlsNG-d62444.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6b0ec9ae-5bcc-0a2a45010019-34652b019225-4 for ; Tue, 01 Dec 2026 14:20:48 +0100 Received: from MW4PR03CA0125.namprd03.prod.outlook.com (2603:10b6:303:8c::10) by IA1PR12MB8408.namprd12.prod.outlook.com (2603:10b6:208:3db::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.12; Tue, 1 Dec 2026 13:20:40 +0000 Received: from SJ5PEPF000001CF.namprd05.prod.outlook.com (2603:10b6:303:8c:cafe::1e) by MW4PR03CA0125.outlook.office365.com (2603:10b6:303:8c::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.10 via Frontend Transport; Tue, 1 Dec 2026 13:20:38 +0000 Received: from satlexmb08.amd.com (165.204.84.17) by SJ5PEPF000001CF.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.5 via Frontend Transport; Tue, 1 Dec 2026 13:20:38 +0000 Received: from satlexmb07.amd.com (10.181.42.216) 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; Tue, 1 Dec 2026 07:20:37 -0600 Received: from [192.168.31.141] (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.57 via Frontend Transport; Tue, 1 Dec 2026 07:20:34 -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=FfXUp8XLp5A+pUrwiDp/HOY8uUdUm5aoCp16vYc7TZEEorrAzo42llylNgUgdscVHEuA7TKLq3YYwAZqUkaAhqtk0w1xkppPTyryaFJ8MwHoJtc8HDDwqDtPZfdMryVv4K4NrgPHEBnch/ypIOICpJ7A03GgFTs0mXqlPEOmZHSSIzUHolJNvbc2JUj9gZsQ5HneyEbbU7BX81qBc2qHHjkjl8cf3MuJuDfYQ2VeQzKjXMTCbWpr5UEPtXgI+7mnhlWd9vF4cfqscEj5HTRxSwOoOMCBBn9Bp2bSF8W5VKeC9nl4JAz1buaW5Hp/heyVNTeu4lwPph7OsawHVKxqIw== 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=7bNJ+2qUW4as9M7U7GdilV5/i23U8z1KchO5T8HFtzk=; b=mEAFfdmjko5fX75nX1Up8/rshxFah4VJOBINfYQkL0CYct8FPzNi69Qnf9LW89GkzmIRSkMsA9SkXqPy+foL5G057pgxR3Tu1GKHrA1kVj3PnPK89aFYcHoejXgzmJcHv8+0rMrhiyvFiccZTRFHn0VFqQ0tY+xFOp99QUzkt0YCZ+kA4tLGxqMDkHfa2WP7xW24HtepLi4ghVaNM4GakAJix6ibMl0v4zpwFZFXXVfegBP4airI/cXPI2FS+X6ilUublUFjfA9B9IlNhk0RnaksdImpKPK0Ck+jXka6RM3NlfeTI4Dh1XZ5vH20GoE2f/w6GUbnsnXLIanDNv85RA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=valinux.co.jp 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=7bNJ+2qUW4as9M7U7GdilV5/i23U8z1KchO5T8HFtzk=; b=AErhw6WK4+a6y5i9B5O+JJBGp3mhS7Dv4R3S0NZ7xPvRgwUOlOD8rba3Uy8luPV62sU6VyYlA9FBeDfMAB0enA7QH0AqM5LyEhAC8z2lIY8qkB0B4mdfC14ZREOgKRZgEyvHfbUAWyOzuDO1pPEaBXxSapi2cXCdu9vbXsXOVNI= 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: Tue, 1 Dec 2026 14:20:29 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v13 2/5] xen/sched: Link CPU topology to scheduler To: Hirokazu Takahashi , CC: , Juergen Gross , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Timothy Pearson , Alistair Francis , Baptiste Le Duc , Connor Davis , Oleksii Kurochko , Dario Faggioli , George Dunlap References: <20261130065721.95202-1-taka@valinux.co.jp> <20261130065721.95202-3-taka@valinux.co.jp> From: "Orzel, Michal" Content-Language: en-US In-Reply-To: <20261130065721.95202-3-taka@valinux.co.jp> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001CF:EE_|IA1PR12MB8408:EE_ X-MS-Office365-Filtering-Correlation-Id: 713bfae0-ee84-4235-0ee3-08df4fade420 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|23010399003|1800799024|82310400026|376014|7416014|10067099003|56012099006|261026140227099003|261021123027099003|261026121527099003|261028144727099003|261022075727099003|261022105027099003|261021121427099003|261102123227099003|261009223027099003|18002099003|22082099003|11063799006|4143699003|6133799003; X-Microsoft-Antispam-Message-Info: ptHx1R1YkPkPxBkzdeF68CZ7PcdEbTshGFXqLR2KO8o5HVsuCXMiUPMZYFwiuZ5qhC+UEua1SPxLXn9UpYaTtb4DaXlrc9s5yTNUoM54ogomE+XSryUlQYbI1zBQ6rAClz5mcmGs0rx1jTRmz5a9rLWP/XyU5Y/QlZI9UZOaxosJpbhw5/hPiM+5MTIdfBhYZH9Zcso/QIudKB+/SXYCjsvY1SM/jaQKRDrHQYLVns8fstMXt0NVzUPEaSHF4oTEN/B87Sht2EMKuypYZ6TnPgmtZc3fX+JGAqpb+1D0eGKEvmSQ3fsqJs7EFijDGOE/FBjB8ZPjSvBylJEzDyCZkAzTIhMbEgYn23ZdgblHnLoxnja/HMrdgA5b5gzgkmveNo3frBkWKQFTeGHzXiWQjzSM6eqAwyuvlOI7jpJEUTj6cP1TNXAAQL4tzRYPF715TkgWAs7YFup+53oI5v8Rbp5qHct+6qprxunxRJi64cXKjUFzkQlxDO4XseuMp2AEZ+6fKYcQJOTfLVnHZT6S2zhOUHocrta20B8kG8elcrMD+Wp09XFpl8TVb30J+1uynXlH3488cHrC1HS8nlMdfW5bQLcsHHdecbQesg5W3DDuUeK3sWa5Ki8muz1pZCKhmCce/C/wdnNVRbF5JW/DkOQqA7gy8Q1wIKGstq4wlQImSrmKCysDXUE0+cqbjA9CgDD7N9N1/5lP4EGNy90rdQ== 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)(36860700016)(23010399003)(1800799024)(82310400026)(376014)(7416014)(10067099003)(56012099006)(261026140227099003)(261021123027099003)(261026121527099003)(261028144727099003)(261022075727099003)(261022105027099003)(261021121427099003)(261102123227099003)(261009223027099003)(18002099003)(22082099003)(11063799006)(4143699003)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: U2eRsD+SZzrq0VZapiUyBvrcHv1CvM6PLkAZv5xugbCGLFhOuz5J46xLqjkrALO5iKWXK5/MDtzknoCF2qcawF83NHioRPmyaHBa6/JgdxSY9p1aMdnetfRjJjC+OLGvickKGsZGY4RP2GiEkpJaz0IYDYh7d5FGzZvnalZi0G28iLJ2BikpQxKIuJyiAXZHIdGpCU6Pjv16FZBTLXG0Yq1hIMC75e+ZtZptj031+S4yJgrVwerewI/lRxy4Z0Cw/weyAiqFSfEgRAi1giuNruxcA/dB2XmCt20yHVulhBp+Iav3+VDLLLVLIVnVOFO24T/asn358jLF2SePkLwZASC7yHv1fCbZpHrsL7z6g9FohUzSUvOSe5y9FMGvyOYoVISyKpUMaMsBrEcwxMhU97Zy6fz4UOS1hgsK8e1bUsGJ+mnD2ULtxVAlDdLf0ywO X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2026 13:20:38.3850 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 713bfae0-ee84-4235-0ee3-08df4fade420 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: SJ5PEPF000001CF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8408 X-purgate-ID: tlsNG-d62444/1796131248-4C36A5FD-F269CDA8/0/0 X-purgate-type: clean X-purgate-size: 2956 X-Spam-Status: No, score=-17.3 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 30-Nov-26 07:57, Hirokazu Takahashi wrote: > Make CPU topology information available to the Xen scheduler. > Additionally, ensure that this topology information is displayed > when executing the 'xl info -n' command. > > Signed-off-by: Hirokazu Takahashi > Acked-by: Jan Beulich > Reviewed-by: Juergen Gross # scheduler part > --- > xen/arch/arm/include/asm/processor.h | 4 -- > xen/arch/arm/smpboot.c | 34 ++++++++++++----- > xen/arch/ppc/include/asm/processor.h | 4 -- > xen/arch/riscv/include/asm/processor.h | 4 -- > xen/common/device-tree/cpu-topology.c | 53 ++++++++++++++++++++++++++ > xen/common/sched/credit2.c | 6 +++ > xen/common/sysctl.c | 1 + > xen/drivers/acpi/cpu-topology.c | 3 ++ > xen/include/xen/cpu-topology.h | 24 +++++++++++- > 9 files changed, 110 insertions(+), 23 deletions(-) > > diff --git a/xen/arch/arm/include/asm/processor.h b/xen/arch/arm/include/asm/processor.h > index 8ee8f88fb4..fe4125cd75 100644 > --- a/xen/arch/arm/include/asm/processor.h > +++ b/xen/arch/arm/include/asm/processor.h > @@ -614,10 +614,6 @@ void show_stack(const struct cpu_user_regs *regs); > > #define cpu_relax() barrier() /* Could yield? */ > > -/* All a bit UP for the moment */ > -#define cpu_to_core(_cpu) (0) > -#define cpu_to_socket(_cpu) (0) > - > struct vcpu; > void vcpu_regs_hyp_to_user(const struct vcpu *vcpu, > struct vcpu_guest_core_regs *regs); > diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c > index 97e227cd92..41162f8ea1 100644 > --- a/xen/arch/arm/smpboot.c > +++ b/xen/arch/arm/smpboot.c > @@ -103,17 +103,30 @@ static void set_cpu_sibling_map(unsigned int cpu) > BUG_ON(!per_cpu(cpu_sibling_mask, cpu)); > BUG_ON(!per_cpu(cpu_core_mask, cpu)); > > - /* > - * Currently we assume there is no multithread and NUMA, so > - * a CPU is a sibling with itself, and the all online CPUs > - * are supposed to belong to the same socket (NUMA node). The comment above cpu_sibling_mask definition is still stale i.e. current Xen on Arm assumes there is no multithread. BTW. We still have a warning if we find MPIDR MT bit set although this bit does not really mean the CPU supports SMT. That's bad because on e.g. A78 which is commonly used these days and that has this bit set, the warning is on. The warning is right that SMT might impact the security of the system as some things are shared between threads. This is just a note that we should do something with that in the future i.e. remove the check that is based on MPIDR and decide what to do with the warning (e.g. use the cpu topology information instead). No action for this patch specifically. With the stale comment removed: Acked-by: Michal Orzel ~Michal