On 30.03.2022 11:36, Penny Zheng wrote:
> --- a/xen/common/memory.c
> +++ b/xen/common/memory.c
> @@ -249,6 +249,26 @@ static void populate_physmap(struct memop_args *a)
>
> mfn = _mfn(gpfn);
> }
> +#ifdef CONFIG_STATIC_MEMORY
> + else if ( is_domain_on_static_allocation(d) )
> + {
> + for ( j = 0; j < (1U << a->extent_order); j++ )
> + {
> + page = page_list_remove_head(&d->resv_page_list);
How do you guarantee the pages are contiguous, as required by a non-zero
a->extent_order? Did you perhaps mean to forbid non-zero-order requests
in this configuration?
> + if ( unlikely(!page) )
> + {
> + gdprintk(XENLOG_INFO,
> + "Could not allocate guest page number
> %lx\n",
> + gfn_x(_gfn(gpfn)));
> + goto out;
And earlier allocated pages are simply lost / leaked?
Jan