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

[PATCH v3 01/22] xen/device-tree: Initial framework for Device Tree NUMA support


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
  • Date: Fri, 19 Jun 2026 16:49:49 +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=XqzPDWwCk81V+4XPneDM8qTwAhjlrgmLc9YUkmpu6Y4=; b=f9HHOLVFvacg56EevAz5BvTXlngxQwiEOkFIJ02NNzfouyV9JD1A8ct2E2AKCQKlkgkugXAODkBLPcR7f6RJvRkgyF72SGl0/3OiEXN1NrVbNM3vEMXUkzic/KfXb206c9sVqiZz6Gf9mDxH64h3DVnWwMw65BTfJvz9UfHLRdIllSI9bq2iWhFrfU1JJwS6WTKXCrDo59kxJHkuuadkVLRPxh6lKjE60kbm2cnZoopBX6Wk8lWZBFtUVcca8CceF2XcTqrm9QDjIWl/1QtEh+Tq+zbxykFvpp8WvyE30VTgJkP50sMjZnvwga8SMSEVzgyMkjLUOTEDuPtQqM6Y8Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=prjpCAtF2OY40ryy6Z8I4Bvzmqt3ctMWN4JlfLcaEhmb0rLy92TMr1yDsfzef/c3qdXMCD1CY+xhMGkvN/da4p+2cfl9aJ1GI0q+0vqhfzJsr4S5h5XvxRBSHU3G4z4JDt+6WxoISFBjqnZ8yaXIlnpXIkcvySysRfyqdhNlyqrMl8S/0HzjGY8aK3cAMRY3fJWlfgnBoOCfF0AK1WLM3T6gaT4do/H5EpcwLu/plcrSZqI60XpmbDr6zPFo8cRL3PLP4mtJhg5B+fwPCPACYLZ5XGRdSVMe1t5BTPK4cL+CG1GXzM6TqdyEpoA/oAKhO7Y70+Mwi9zl4kZQ0pYktA==
  • 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>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 19 Jun 2026 07:50:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Introduce the initial framework for Device Tree-based NUMA support
on ARM Xen. This patch adds the required Device Tree-dependent
helper functions needed for NUMA configuration. Note that some
functions currently contain stub implementations.

Signed-off-by: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
---
 xen/include/xen/bootinfo.h | 14 ++++++++++++++
 xen/include/xen/dt-numa.h  | 23 +++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 xen/include/xen/dt-numa.h

diff --git a/xen/include/xen/bootinfo.h b/xen/include/xen/bootinfo.h
index dbf492c2e3..ca675db5ce 100644
--- a/xen/include/xen/bootinfo.h
+++ b/xen/include/xen/bootinfo.h
@@ -6,6 +6,7 @@
 #include <xen/kernel.h>
 #include <xen/macros.h>
 #include <xen/xmalloc.h>
+#include <xen/errno.h>
 
 #define NR_MEM_BANKS 256
 #define NR_SHMEM_BANKS 32
@@ -214,4 +215,17 @@ void fw_unreserved_regions(paddr_t s, paddr_t e,
                            void (*cb)(paddr_t ps, paddr_t pe),
                            unsigned int first);
 
+static inline int bootinfo_get_ram_range(unsigned int idx, paddr_t *start, 
paddr_t *end)
+{
+    struct membanks *mem = bootinfo_get_mem();
+
+    if ( idx >= mem->nr_banks )
+        return -ENOENT;
+
+    *start = mem->bank[idx].start;
+    *end = *start + mem->bank[idx].size;
+
+    return 0;
+}
+
 #endif /* XEN_BOOTINFO_H */
diff --git a/xen/include/xen/dt-numa.h b/xen/include/xen/dt-numa.h
new file mode 100644
index 0000000000..c4a229bf9b
--- /dev/null
+++ b/xen/include/xen/dt-numa.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef XEN_DT_NUMA_H
+#define XEN_DT_NUMA_H
+
+#include <xen/types.h>
+#include <xen/device_tree.h>
+
+static inline unsigned int numa_node_to_dt_nid(unsigned int n)
+{
+    return n;
+}
+
+#endif /* XEN_DT_NUMA_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
-- 
2.43.0




 


Rackspace

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