|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [PATCH v1 4/5] xen/arm: retrieve reserved pages on populate_physmap
Hi Jan
> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Wednesday, March 30, 2022 5:59 PM
> To: Penny Zheng <Penny.Zheng@xxxxxxx>
> Cc: Wei Chen <Wei.Chen@xxxxxxx>; Henry Wang <Henry.Wang@xxxxxxx>;
> Andrew Cooper <andrew.cooper3@xxxxxxxxxx>; George Dunlap
> <george.dunlap@xxxxxxxxxx>; Julien Grall <julien@xxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>; Wei Liu <wl@xxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v1 4/5] xen/arm: retrieve reserved pages on
> populate_physmap
>
> 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?,
True, true, thanks for pointing that out.
I would not intend to add complex algorithm here to find contiguous pages of
requested
order, forbidding non-zero-order with error message shall be added here.
>
> > + 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?
>
That was unconsidered, thanks for pointing that out.
Since now we are forbidding non-zero-order requests, earlier allocated pages
shall
not need to be considered.
> Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |