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

Hirokazu Takahashi posted 3 patches 2 days, 18 hours ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20260610111320.133784-1-taka@valinux.co.jp
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
[PATCH 0/3] xen/arm: Device Tree based CPU topology support
Posted by Hirokazu Takahashi 2 days, 18 hours ago
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