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

[PATCH v2 11/17] xen/arm: keep guest still be NUMA unware


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Tue, 10 Jan 2023 16:49:24 +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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0gPXnqAOqOIvOq2SZnrFV2Z6dU7bFkyDMdqIXXj4RZE=; b=Yjs+/qYvY3LWbPPqt1nOwUT+ND+0HA/2TDbVwfwejFYNbHjUKu3FlpI1tOKXABfnIGw/e+B0KVTnlo9HDIeaBnyW3BIgh8e4kI/itxDwHhowP3aFACRITi6K+0lqxCGFs6iZ05TAFrcyWzyGI1hXNkjivc52DMHAGLukD5fAAVZRq1PoXhQ0j0zDXuqA3azmZ52UkLAai4u2K+ou0Bl2yI1HckamsJjobuFx8kOvWXp8Dbbs2NSyNjOy64Q988BNklB/9OOetFF87RqDQR7mHsdX5NKuQGlfnBDBgpgRJHZNAvXwg53zQtcezdLbwZFIQXPk5qner1XTYG6sg5Rg5A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ea+N/6nIfTQX1zQDTrZPfLnRLTDx0+uMl03K9gBFLueweRyVU5+svrm63ncWD0Nj5p/tN6c4w+BhBAPLdmw9DnQ0JRl3fpDxlyItIL0tPSPnEgWf7CLMn+JefwPqEbX0u2EBysX2QPcfF5tb9ZeEoVWCNYeJbe8hlFC3fAnhw5vb1gkgAXs9yiWQDe5ZVw8qSkWmn9r1VPxuxcgy1cfyADHBD7PzKJTuAGEAXkiLqAOxBU53jeprvYBWD27PQ28VSupj9ucH6IhIzKiHL2VFsTT2BLxTjGccR6kuky32XOM8L7LOkyfZRjuc+bUrJfDHPaJ3FTSX7glml6WNly2ofQ==
  • Cc: <nd@xxxxxxx>, Wei Chen <wei.chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 10 Jan 2023 08:55:38 +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>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
v1 -> v2:
1. Add Rb
---
 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 829cea8de8..8258048d0e 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1185,6 +1185,10 @@ static int __init write_properties(struct domain *d, 
struct kernel_info *kinfo,
                 continue;
         }
 
+        /* Dom0 is currently NUMA unaware */
+        if ( dt_property_name_is_equal(prop, "numa-node-id") )
+            continue;
+
         res = fdt_property(kinfo->fdt, prop->name, prop_data, prop_len);
 
         if ( res )
@@ -2540,6 +2544,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®.