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

[PATCH] xen/dt: Don't advertise Xen static-heap region to hwdom


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 29 Oct 2026 11:43:05 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=p/Gsr14SbE4BHUwi0UD3spkz8U+EQr4T/9fDf5mXp34=; b=NFur581ba0D8h2QKaDRMK5SQ8Od9iYWFyrXlXuKeroSfJRqGDh/j08R49jcz30x+hresMkP5dA6S4qCYNSbxFBFo5EoaSpKK9fg3fsTG4lzFeZrswGbT/YdOplUMncF+IZcaAFDz1OP6hZrNmN5cZ9rwsLGGWh/MeI537AgeMkSEZpsadQlqxy6Mf0Gsl49yVzQeztXVv/ppHH4WE95AnzZJ1vcFQarh0j+ijPf97qb9y8A/tef93u0TY0L434gw9m7893xZ1vbcCKy6u63X7u9hCQvDMdMMvToqhHsvjoGLmnAaaOY5N2c2f5cp/gAJipzQS5CTv6fWgLFJQDRGeA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T7egk3bZJ24CkH/Jy0jyvk6FpZPMk0T/ekulm14gs9NbK4GautO6ocPr+Thj1AJ4s1Rjj1pIfQF6vvLFn7zGnBeV3WrmQaMy/wRHYfM9MHYV32+kzpSU7M05pOitJIrHh/Gk89yPhEJ0fc2r+LfPBo0AWQ3tISNCPNiwqyVkQCD/W1qbX5bUiS+XeFA1a7pqV/OmoutFWumhkWkQG0fKPkNAxGjltgAUS17SBwbQZgTyeIjofxw/htdUCrf4aMBjRg8ERUu535ErOwKAKXPYuInFTOYqz1KCL7AsvvB6+SCssA2AGYNLqg4bl89opxg/TVr/fJMhI9p68nuljTTj7w==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • Delivery-date: Thu, 29 Oct 2026 10:43:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

bootinfo.reserved_mem is used to store different types of memory that
Xen considers as reserved: domU static mem, normal /reserved-memory,
FDT memreserve and Xen static heap. make_memory_node(), invoked during
FDT generation for a hwdom for reserved memory, only skips the domU
static memory and FDT memreserve. This results in advertising Xen static
heap (if used) to a hwdom as /memory. This memory is not mapped in P2M
and guest attempt to access it fails. Interestingly, if the
/reserved-memory node is placed after /chosen, there is no problem because
of the check at the beginning of make_memory_node() that finds the first
memory range using the correct type.

Fixes: 4596329291f5 ("docs, xen/arm: Introduce static heap memory")
Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
 xen/common/device-tree/domain-build.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/common/device-tree/domain-build.c 
b/xen/common/device-tree/domain-build.c
index 30a59abfa722..634a26946c24 100644
--- a/xen/common/device-tree/domain-build.c
+++ b/xen/common/device-tree/domain-build.c
@@ -541,8 +541,7 @@ int __init make_memory_node(const struct kernel_info 
*kinfo, int addrcells,
         u64 start = mem->bank[i].start;
         u64 size = mem->bank[i].size;
 
-        if ( (mem->bank[i].type == MEMBANK_STATIC_DOMAIN) ||
-             (mem->bank[i].type == MEMBANK_FDT_RESVMEM) )
+        if ( mem->bank[i].type != MEMBANK_DEFAULT )
             continue;
 
         nr_cells += reg_size;
-- 
2.43.0




 


Rackspace

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