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

[PATCH v3 00/22] Introduce Device Tree based NUMA support for ARM Xen


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
  • Date: Fri, 19 Jun 2026 16:49:48 +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=A5DRyVcGqc4trjAUUFIspT0qRbRZA+1C1Qy6wanYWX0=; b=esF6qEghcxqV8KTxizuC6j4nqFCh0XSdkmaH1RAE3xD9mCk8Tg7td3OOx90Zf+PUNApKX/oe2Eg+uygzqp1TIhuxk+Fn1z2R6vsvxj5f9z7S00mJuRuwPDhte50b3M0tscqcKCwKkRs8mxnpPANTmD4Aqqj0+TTZjVAyBrRSbCj3Rkit5AznzMDeGsD1dEug0+xKGyVq7oTPlXYPahP1PLc/kyUHXuHTEherEk3ZX41VYj27u3dh48XJZWqfRt48OEBoW0aCWo612RvnKaHOOT9q/+gbDsfzsolVtFGE5ACAA6/rTx0xssfZ361yXfvjKQkW00Cd4V7DuRWZSwB2Lw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Hy2C9xnszRL+Qa89EGIFb2k7vsQLTEz/SXhacF/6GEAoMPHL8GxeTPUDl21lYgP7d68vy4Ivcg9cCsLm+kRK96X7DWmaIHOvawTfBpR5WswfPBuegxX16rpXqFaH4pqriFT08mNfRNNoMLnNh4Dn35zAYTEhaHiQ1EYM2Wv7RbIf/ieYjQlQYYJKXpkmLWMzkittt0lLwSV9pEr+WWYk8QW17eMo4kcYqko3b0LgQ2djS8rg4VVboGzbbC17nTkU8WnoEC4t+ldgsVIHWEUYqtFELNpLS2FytUlkErKxJ4w1Bw1dQwW1iReYOoJTFLQxHRFNwNo37lhexMjEAX7lrg==
  • 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: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 19 Jun 2026 07:50:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello,

Here is the v3 of the patch series to introduce NUMA support for
ARM Xen.

For this stage, I am focusing on getting it up and running based
on Device Tree. I think porting this patch series over RISC-V Xen
or PPC Xen will be pretty easy.

Please note that this series is meant to be used alongside the CPU
topology patch series.
Please note that this series is best used alongside the CPU
topology patch series. It can actually run without them, but it
won't be as efficient.

Changes in v3:
- Split off the CPU topology patches into a separate series:
  "Device Tree based CPU topology support".
- For the distance map table, now we only allocate enough memory
  to match the actual number of NUMA nodes.
- Separated the distance map table functions into generic and
  Device Tree-dependent parts, keeping future ACPI support in mind.

Changes in v2:
- Fix vNUMA memory allocation algorithm to support ARM
- Allocate vNUMA memory from the associated pNUMA memory
- Include the XSM Policy module size in the required memory
  calculation for Dom0 Bank 0.
- Enforce a minimum chunk size of 4MB during Dom0 memory
  allocation.
- Define the cpu_to_core() and cpu_to_socket() macros in
  cpu-topology.h instead of processor.h, as processor.h should
  strictly focus on processor hardware information.
- Make cpu_nr_siblings() an architecture-specific function.
- Refine the code to conform with the Xen coding style guidelines.

Thanks,
Hirokazu Takahashi

Hirokazu Takahashi (22):
  xen/device-tree: Initial framework for Device Tree NUMA support
  xen/common: Default function to get the distance between nodes
  xen/arm: NUMA helper functions via Device Tree helpers
  xen/arm: Introduce CONFIG_DEVICE_TREE_NUMA config option
  xen/arm: Configure NUMA affinity for populated memory banks
  xen/arm: Map populated CPUs to their respective NUMA nodes
  xen/device-tree: Read NUMA node distance from Device Tree
    'distance-map'
  xen/common: Allow building ARM32 Xen with CONFIG_NUMA
  xen/arm: Introduce dom0_nodes boot command option
  xen/arm: Set Domain-0 node affinity from dom0_nodes option
  xen/arm: Reflect physical NUMA node IDs in Dom0 memory DT nodes
  xen/arm: Balance Dom0 vCPU assignment across NUMA nodes
  xen/arm: Export Dom0 vCPU-to-NUMA node mapping to Device Tree
  xen/arm: Generate distance-map node for Dom0 Device Tree
  xen/arm: Balance Dom0 memory allocation across allowed NUMA nodes
  xen/arm: Use dedicated function for Static SHM Device Tree creation
  tools/libxl: Fix vNUMA memory allocation algorithm to support ARM
  tools/libs/guest: Allocate vNUMA memory from associated pNUMA nodes
  tools/libxl: Add 'numa-node-id' property to DomU memory nodes
  tools/libxl: Add 'numa-node-id' property to DomU CPU nodes
  tools/libxl: Create 'distance-map' node in DomU Device Tree
  xen/arm: Support numa and dom0_nodes boot options

 docs/misc/xen-command-line.pandoc     |   9 +-
 tools/libs/guest/xg_dom_arm.c         |  57 +++-
 tools/libs/light/libxl_arm.c          | 103 ++++++-
 tools/libs/light/libxl_vnuma.c        |  13 +-
 xen/arch/arm/Kconfig                  |   8 +
 xen/arch/arm/Makefile                 |   1 +
 xen/arch/arm/domain_build.c           | 426 +++++++++++++++++++-------
 xen/arch/arm/include/asm/numa.h       |  20 ++
 xen/arch/arm/numa.c                   |  57 ++++
 xen/arch/arm/setup.c                  |   8 +
 xen/arch/arm/smpboot.c                |  20 ++
 xen/common/Kconfig                    |   8 +
 xen/common/Makefile                   |   1 +
 xen/common/device-tree/Makefile       |   1 +
 xen/common/device-tree/bootinfo-fdt.c |   8 +
 xen/common/device-tree/domain-build.c |  99 +++---
 xen/common/device-tree/numa.c         | 105 +++++++
 xen/common/numa-distance-map.c        |  62 ++++
 xen/common/numa.c                     |   2 +-
 xen/include/xen/bootinfo.h            |  39 +++
 xen/include/xen/dt-numa.h             |  30 ++
 xen/include/xen/fdt-domain-build.h    |   2 +
 xen/include/xen/numa.h                |   7 +
 23 files changed, 904 insertions(+), 182 deletions(-)
 create mode 100644 xen/arch/arm/include/asm/numa.h
 create mode 100644 xen/arch/arm/numa.c
 create mode 100644 xen/common/device-tree/numa.c
 create mode 100644 xen/common/numa-distance-map.c
 create mode 100644 xen/include/xen/dt-numa.h

-- 
2.43.0




 


Rackspace

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