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

[PATCH 13/21] xen/arm: Introduce dom0_nodes boot command option


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
  • Date: Sun, 24 May 2026 09:02:01 +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=0S1ZqEU1iZpAsWT1zego46VY83uaoXXJ+aqFDfCXlC4=; b=hda81wSSR2XKn/b57SIwcYHNSVANGxALEsPS9hGrjUe6H/pfUqOlbQ9fs+VCi+wHNio/j6mQXQlXpzEtBPcLiXgYEPC24LnsvF/WnD2c3USaxeHN/mHJrh3YrlF52EPQO+j8b61ZPBYpEHxppNMuapZ1tNeLGfFoXGqHXQVdh4yHPNibmecKToA8nVfaKQIUMcFGrXsez8mo4Vf9BfE33WfQgZSBqvFaNxsYo3fSyRn21nQOmLtqY6aaTWA7bDy25C4trTHCbGnr5Cxvy4c+GTezCx6mzepBWGCs9j4ZwTDAXGrVEBolgFsiWbzGINfhiaNHGm2aEZGQHca7l3iGWw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WjaVTkjGtDCM4cyk1wUS4zep+gOWn5jb87nPJI0aYuFJX0kV5dlCy6HZL5J8yKl2RQQvdk3szsBU5EBp+lUlY2zLuYBbQahLkwG8uTZqmon/2kLjkQam2KGJ/zeCRMQtRRdt/FsevNw+96n0EFWT0yD3AlrYjw1YFGh0DzSRv5EkVdvuj+j+2geXJ6vvfLQyLNZUFaBEJEA2vp5wAxUqd5jas5Plu1VJ/Rx+0XhPPaksC3jrkj6B+3eDw16Wuc0WnIOcb9nSDWcvKuXJrkWP48A2xI3ZCDoieLV70NqeoPDyC1sKTqWmXiEt4ajSmKnbIj0t8dPq/BMV34Fq4yjtlQ==
  • 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: andrew.cooper3@xxxxxxxxxx, anthony.perard@xxxxxxxxxx, michal.orzel@xxxxxxx, jbeulich@xxxxxxxx, julien@xxxxxxx, roger.pau@xxxxxxxxxx, sstabellini@xxxxxxxxxx, jgross@xxxxxxxx, bertrand.marquis@xxxxxxx, Volodymyr_Babchuk@xxxxxxxx, dfaggioli@xxxxxxxx, gwd@xxxxxxxxxxxxxx, Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
  • Delivery-date: Sun, 24 May 2026 00:02:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Allow ARM Xen to accept the 'dom0_nodes' command line option.
The syntax and format of the parameters are identical to the x86
implementation. The logic that actually functions based on this
argument will be provided in a follow-up patch.
---
 xen/arch/arm/domain_build.c | 43 +++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 1efddc60ef..f4187512b0 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -37,6 +37,7 @@
 #include <asm/cpufeature.h>
 #include <asm/domain_build.h>
 #include <xen/event.h>
+#include <xen/ctype.h>
 
 #include <xen/irq.h>
 #include <xen/grant_table.h>
@@ -66,6 +67,48 @@ static int __init parse_dom0_mem(const char *s)
 }
 custom_param("dom0_mem", parse_dom0_mem);
 
+static nodemask_t __initdata dom0_nodes;
+bool __initdata dom0_affinity_relaxed;
+
+#ifdef CONFIG_NUMA
+
+static int __init cf_check parse_dom0_nodes(const char *s)
+{
+    const char *ss;
+    int rc = 0;
+    unsigned int nid;
+
+    do {
+        ss = strchr(s, ',');
+        if ( !ss )
+            ss = strchr(s, '\0');
+
+        if ( isdigit(*s) )
+        {
+            const char *endp;
+
+            if ( (nid = simple_strtoul(s, &endp, 0), endp != ss) )
+                rc = -EINVAL;
+            else if ( nid >= MAX_NUMNODES )
+                rc = -E2BIG;
+            else
+                node_set(nid, dom0_nodes);
+        }
+        else if ( !cmdline_strcmp(s, "relaxed") )
+            dom0_affinity_relaxed = true;
+        else if ( !cmdline_strcmp(s, "strict") )
+            dom0_affinity_relaxed = false;
+        else
+            rc = -EINVAL;
+
+        s = ss + 1;
+    } while ( *ss );
+
+    return rc;
+}
+custom_param("dom0_nodes", parse_dom0_nodes);
+#endif /* CONFIG_NUMA */
+
 int __init parse_arch_dom0_param(const char *s, const char *e)
 {
     long long val;
-- 
2.43.0




 


Rackspace

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