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

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


  • To: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Halder, Ayan Kumar" <ayankuma@xxxxxxx>
  • Date: Tue, 20 Jan 2026 18:39:22 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.com 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=9lrCCxiD8hJQD3hxgO2twKCy00V5+OdjsauUV3ipJiE=; b=VUp+45hxqqbCJwQ107tU4Ego3RgcgIISDZv8+Yi/eWOdeM2HQPNsJOydMF3EDRyq7z1T721dHQwuwgGNAEkxcTraeO6xTgAfZuFAltqbO2JXFGxWCWF0gtFwV9jbzz5UFEIxCq0V4ceegYzoJOU366LlBv9fFuGmnpFx9FBJ1nEnMYGLhykd6WSp6W8JDfqJSvJu+AHvmBKV+956nlDulGrbDpZoLh0otjFEBTwNpO3VRO+LQgnghP+Eu0QY9e8/cE8ayUrduRP6kTvoA3u/v5hPQQs7z/VssuYUlJQuzyAFkKjOJXdYCkXKAEei3wvDmfnzalCBkHUKtZZ+b5aS5w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WuHoWlyxnhlT2dGfXDLLHmYJ/GRmO2SYy14uQhtGYl+IbUFlSYTrcNRvLnqdCljBJUbiRxpKi6umr6LFbAOD4FCNfaU+if1fcZKGyg/qRhTeZYTkTNLw3u7uvgwYKlqSB6GeHoCMlmr7GgteyuYzBF3/igmne1RmfaViTG7tZl7P8gA78RGQVibHq2cXJ0ijBt15g0rEMBXqggvloaYczyJO3qGUbbaGHuO4ePTQjhtkI+I8MLJRDpuQsiUzbhmaJ7VQmQVq1pJKg1zsmyCLz1SUf6RxR182nd36FL0exVNuK5gaPbJW7QJ8QesE+/hoN5i2Rl0dGKDg6yo15T00Vg==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Tue, 20 Jan 2026 18:39:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Oleksandr,

On 20/01/2026 18:23, Oleksandr Tyshchenko wrote:
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>

Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>

with a question

---
  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"

Was this property recently introduced in Xen ? If so, it may be good to refer Xen's commit id.

- Ayan




 


Rackspace

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