On 13.02.2026 21:40, Roger Pau Monné wrote:
> @@ -336,14 +344,28 @@ unsigned long __init dom0_compute_nr_pages(
> {
> nodeid_t node;
> unsigned long avail = 0, nr_pages, min_pages, max_pages, iommu_pages = 0;
> + unsigned long init_images = 0;
>
> /* The ordering of operands is to work around a clang5 issue. */
> if ( CONFIG_DOM0_MEM[0] && !dom0_mem_set )
> parse_dom0_mem(CONFIG_DOM0_MEM);
>
> for_each_node_mask ( node, dom0_nodes )
> - avail += avail_domheap_pages_region(node, 0, 0) +
> - initial_images_nrpages(node);
> + {
> + avail += avail_domheap_pages_region(node, 0, 0);
> + init_images += initial_images_nrpages(node);
> + }
> +
> + if ( is_pv_domain(d) )
> + {
> + /*
> + * For PV domains the initrd pages are directly assigned to the
> + * guest, and hence the initrd size counts as free memory that can
> + * be used by the domain. Set to 0 to prevent further adjustments.
> + */
> + avail += init_images;
> + init_images = 0;
> + }
Just to mention: It's still only "may be directly assigned", because of the
PV32 special requirements.
Jan