On 20.01.26 20:39, Halder, Ayan Kumar wrote: > Hi Oleksandr,
Hello Ayan > > 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 <[email protected]> > > Reviewed-by: Ayan Kumar Halder <[email protected]> thanks > > 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 ? No. It was introduced more than 3 years ago by the following commit cbea5a1149ca7fd4b7cdbfa3ec2e4f109b601ff7 “xen/arm: Allocate and free P2M pages from the P2M pool”. If so, it may be good to > refer Xen's commit id. > > - Ayan >
