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

[ImageBuilder][PATCH] uboot-script-gen: Add support for specifying domain P2M pool size


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Tue, 20 Jan 2026 18:23:48 +0000
  • Accept-language: en-US, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; 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=xbWEWJU/0bw/0f2OVvUtHrkNhgI03KuSe4SeOEOT50w=; b=jv3TnyHqqXa4QzUuUN6zYfEFcDkhfeOM+u2CCsGjzRQyZc9tjmk93HTGlaHJFQDWagiVotgJ2aZzNJ+bPvTgILpqb6mSaK64+CN2g12iM3AMWMjbXKZkbrPq/6yGDE/CqnzZNX810IKOMktTmJxumqg6kM+Hk/D4ro4BXYCaidyoF/Xtu1c3SHb9I0dpmSLft2tUvebNAe/xRLCKhBq3NahaYw08tD50t+jyYxPZ2zCl11yxhzCzBHI0UNGqIIBOyGtg+JMTlCc6JO5oxJJh15o+9RDrpIPY9yE6rNzWL5iBm/y6GhL4Xv+T9pXL7hoGaAALnKBTxWuxtg9OvyPI2w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XOoSJ9HC/OhTECCzqe3Q5u5fOsymJmCrpUWQLjiBaS+AH9yjXsY5iFYnKOxnVugeXJbxmOIsnGgUGqLCsYr8NW/8awAqUgdT4A4a/hji3WVp/0CgqkcZqmi3TNuQxvS6mFwvFI88JP17ECTMwpZnNYOuP+TdhWV8W6sBQ9EDdybUYBvubGYQP5jfp5QZKQ5nYU8fTUAA/mFk6+nECkk4byOEUsnWTaQUAWrPyRwXDYQQ8ftCj3JYhy41/d2moueQbOCYLT3UL1O8I8Qz4Eo3vpmy279gWjHBnLubwPYGprUcCxnDZnyMkf85uz83Sn4ThyyryvOaVjls9hBQrPa/TA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Ayan Kumar Halder <ayankuma@xxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Tue, 20 Jan 2026 18:24:06 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcijnrd0sgeuOEFUiPnDmCo+f/yg==
  • Thread-topic: [ImageBuilder][PATCH] uboot-script-gen: Add support for specifying domain P2M pool size

The DOMU_P2M_MEM_MB configuration option is used to specify
the amount of megabytes of RAM used for the domain P2M pool.
It allows users to manually define the memory size reserved for
P2M structures in non-hardware domains, overriding the default
value calculated by Xen.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
---
 README.md                | 7 +++++++
 scripts/uboot-script-gen | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/README.md b/README.md
index 983cbbc..c7ae98e 100644
--- a/README.md
+++ b/README.md
@@ -203,6 +203,13 @@ Where:
   NOTE that with this option, user needs to manually set xen,passthrough
   in xen.dtb.
 
+- DOMU_P2M_MEM_MB[number] is optional 32-bit integer specifying the amount
+  of megabytes of RAM used for the domain P2M pool. If not set, the default
+  size is calculated by Xen.
+  Note that the P2M pool is used to allocate pages for P2M structures for
+  non-hardware domains. For the hardware domain, P2M pages are allocated
+  directly from the heap.
+
 - DOMU_MEM[number] is the amount of memory for the VM in MB, default 512MB
 
 - DOMU_VCPUS[number] is the number of vcpus for the VM, default 1
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index d18ac55..0c86c2d 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -514,6 +514,11 @@ function xen_device_tree_editing()
             dt_set "/chosen/domU$i" "passthrough" "str" "enabled"
         fi
 
+        if test -n "${DOMU_P2M_MEM_MB[$i]}"
+        then
+            dt_set "/chosen/domU$i" "xen,domain-p2m-mem-mb" "int" 
"${DOMU_P2M_MEM_MB[$i]}"
+        fi
+
         if test -n "${DOMU_SHARED_MEM[i]}"
         then
             add_device_tree_static_shared_mem "/chosen/domU${i}" 
"${DOMU_SHARED_MEM[i]}"
-- 
2.34.1



 


Rackspace

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