mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
On Arm, the hardware domain does not use the P2M pool. Its P2M pages are allocated directly from the heap, without any limit. However, when the hardware domain is created using dom0less, we still allocate a P2M pool for it, either of the default size or the one given in xen,domain-p2m-mem-mb. This memory is never used and is simply wasted. The same applies when the pool size is set for the hardware domain using XEN_DOMCTL_set_paging_mempool_size. Don't create the pool for a hardware domain. Make the get/set paging mempool domctls return -EOPNOTSUPP, skip the pool teardown and reject xen,domain-p2m-mem-mb for a hardware domain in dom0less. The dom0less check is Arm specific, because on RISC-V the hardware domain does use the P2M pool. Signed-off-by: Michal Orzel <michal.orzel@amd.com> Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>