[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/3] xen/arm: Device Tree based CPU topology support


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
  • Date: Wed, 10 Jun 2026 20:13:17 +0900
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=valinux.co.jp; dmarc=pass action=none header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
  • 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=34rsH+F2NRs2isIyTtDSehq5A47h7DkUrBhtacMnahQ=; b=LpwWhRbn7Ln4Le8RZHuGOUmFsOaTpZUFZVbwWfe5DVujcagvcvfgp08yduMzqmdweUGO6Sa7zhc9pI4+vu5rZVjZFGGH7f4+7jqJYkjsEJ0NoXUgO2VPs40XEerV1c/JGEC16e8sa50ZZHH52Mw+91numOwMF0/DkhVzd18TD4gb4okBkAAYqHMmkrhQUZm3RItyRwjmr/gHZQCaQcOLHOii+y152EK5AJhg3qVioGe4khh7UF85d3XTip5Oe0seuSfcJeb6TM/ROsTXDyoFJW59LWrCTBLKRrTH3DbNFt4kjtlEfC36ADG4VuPzhTiOMc1JCyPOls8y0gl0tiswcw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vmq+4GodjlAkpGOvrd5GTLBYqKbNHcc317EsZw6oMZkPbuxWO9bgTxSW/MfkZcb9pDQiqVnb1OVn47tsDKgRlVdLRLOUPJ0u37oTu/W8GHGldMSw64xOOzR+BtCc6+wpkfq7/D3vWa5Ys6oIxOWi1VL0SbqioTPKnE0alV6fRpr6iz1HYfqs7+LXh0DPRGLUc6AsaS7eYG+/SY/QZTS7h7zg2d7qs+4LeqfvVWr6LOQO2P6gRS2kC5pZw47T88GuwkZVq25MxMdzv6Lbkey5pGkyipi7obKB0NXtaPnDOTSNAo2iWVRtP4VRsocUnjlH0cGoKcOroI0Ge95OV9UIyw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=valinux.co.jp header.i="@valinux.co.jp" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=valinux.co.jp;
  • Cc: Mykyta_Poturai@xxxxxxxx, Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
  • Delivery-date: Wed, 10 Jun 2026 11:13:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello,

This patch series introduces Device Tree based CPU topology support for
ARM Xen.

These patches were previously part of my "Introduce Device Tree based NUMA
support for ARM Xen" series. Since the CPU topology feature can perfectly
work on its own, I decided to split it out and submit it as a standalone
series to make the review process easier.

Compared to the previous version included in the NUMA series, I have made
a few key improvements based on earlier discussions:

1. Optimized Memory Allocation:
   The series now allocates only the minimum required memory area to manage
   the essential data for the CPUs.

2. Flexible Device Tree Parsing:
   The parsing logic no longer depends on the definition order of the 'cpu'
   nodes and 'cpu-map' nodes in the Device Tree. They can now be read
   correctly even if their orders do not match.

3. CPU Hotplug Readiness:
   To support future CPU hotplug, the system assumes that inactive CPUs are
   also described in the Device Tree. Xen will pre-load and generate the
   topology information for these inactive CPUs during the boot phase so
   it stays available in memory.

Summary of changes:
 - Patch 1: Parses the 'cpu-map' node in the Device Tree to extract topology
            information.
 - Patch 2: Connects the extracted CPU topology data to the Xen scheduler.
 - Patch 3: Refactors `cpu_nr_siblings()` to be an architecture-specific
            function, providing an x86 implementation and a common version
            for Device Tree-based systems.

Thank you,
Hirokazu Takahashi

Hirokazu Takahashi (3):
  xen/device-tree: Parse 'cpu-map' node for CPU topology exploration
  xen/sched: Link CPU topology to scheduler
  xen/sched: Make cpu_nr_siblings() architecture-specific

 xen/arch/arm/include/asm/processor.h  |   4 -
 xen/arch/arm/smpboot.c                |  16 +-
 xen/arch/x86/include/asm/processor.h  |   1 +
 xen/common/Kconfig                    |   7 +
 xen/common/device-tree/Makefile       |   1 +
 xen/common/device-tree/cpu-topology.c | 393 ++++++++++++++++++++++++++
 xen/common/sched/credit2.c            |  22 +-
 xen/common/sysctl.c                   |   1 +
 xen/include/xen/cpu-topology.h        |  50 ++++
 9 files changed, 472 insertions(+), 23 deletions(-)
 create mode 100644 xen/common/device-tree/cpu-topology.c
 create mode 100644 xen/include/xen/cpu-topology.h

-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.