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

[PATCH 33/37] xen/arm: keep guest still be NUMA unware


  • To: <wei.chen@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Thu, 23 Sep 2021 20:02:32 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vghFBlrVlMBMFKgAWPXBQGBuhDmWD5Y0b6JI6HLn9ps=; b=Q8d+573xQL/GxJ8OICSS6kZpomg+vZUa2jtLrUNKLcZqpY142658sjFAwduYdYj/71GckBwFeOEevMQK2zX9BIndUwFSscHcFr9Q/um/xnkvCju8n2GIVIPSK9/QE9qzlWC9Yi3lvC5kjXP45ljAZKfLeLI3y70SOJoNTeahjAANvxQOBJ/FY5/yG6zpfpm+i2AtBTMMvlijLbnkYOwpPzDsZcr6a08TTJ8PjbZubcJ2gTJhQDcPqxxrQ2a2sMy6fH/zYYiyMqZGRQ7XGrrE+hyRawJKU1fth30ZqgbDHISBvHApSoKVeejuaUnqcY3cyg+qGqjH+VSbl4yiNgAbSg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H7h8agbnXbNYy4zQeLPQoCUNaCZYwXUgZClp62C/AMHfzOFeZvETHFOBn5WuvSHCXFGZPXi5HTv6E3wHotq9gT6DkYqhUjIaXAvvxamcg93LSGA3zlCVU+eAHh0DscjI8feCGxyw1hl/922SGDjzaxyxcY+DaT3L5AWNDL4euLyqlCZD83/8GAW+h9VDevNHTGyieimDmeovQzWOkA3Nkq0frh8LHonWMjwWzTnqNeL1O0CugedArEMNzqc//DU0VJ25wLFZQbM79TbjhXzPbuvtle+dFRP9s0LEhT8cGu9ffFyJVcj8l0ip6OQrjGrIx+8+lIb7rSuvhKW21X5GyA==
  • Cc: <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Thu, 23 Sep 2021 12:17:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

The NUMA information provided in the host Device-Tree
are only for Xen. For dom0, we want to hide them as they
may be different (for now, dom0 is still not aware of NUMA)
The CPU and memory nodes are recreated from scratch for the
domain. So we already skip the "numa-node-id" property for
these two types of nodes.

However, some devices like PCIe may have "numa-node-id"
property too. We have to skip them as well.

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
 xen/arch/arm/domain_build.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index d233d634c1..6e94922238 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -737,6 +737,10 @@ static int __init write_properties(struct domain *d, 
struct kernel_info *kinfo,
                 continue;
         }
 
+        /* Guest is numa unaware in current stage */
+        if ( dt_property_name_is_equal(prop, "numa-node-id") )
+            continue;
+
         res = fdt_property(kinfo->fdt, prop->name, prop_data, prop_len);
 
         if ( res )
@@ -1607,6 +1611,8 @@ static int __init handle_node(struct domain *d, struct 
kernel_info *kinfo,
         DT_MATCH_TYPE("memory"),
         /* The memory mapped timer is not supported by Xen. */
         DT_MATCH_COMPATIBLE("arm,armv7-timer-mem"),
+        /* Numa info doesn't need to be exposed to Domain-0 */
+        DT_MATCH_COMPATIBLE("numa-distance-map-v1"),
         { /* sentinel */ },
     };
     static const struct dt_device_match timer_matches[] __initconst =
-- 
2.25.1




 


Rackspace

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