[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 01/18] x86/PoD: map one page at a time in p2m_pod_zero_check()



On Wed, Oct 7, 2026 at 1:38 PM Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>
> On 07/10/2026 11:40 am, George Dunlap wrote:
> > diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
> > index 4602c32cff..0b0beca15a 100644
> > --- a/xen/arch/x86/mm/p2m-pod.c
> > +++ b/xen/arch/x86/mm/p2m-pod.c
> > @@ -911,7 +912,12 @@ p2m_pod_zero_check(struct p2m_domain *p2m, const gfn_t 
> > *gfns, unsigned int count
> >      if ( paging_mode_shadow(d) )
> >          max_ref++;
> >
> > -    /* First, get the gfn list, translate to mfns, and map the pages. */
> > +    /*
> > +     * First, get the gfn list, translate to mfns, and pick the pages to
> > +     * check.  They are mapped one at a time below, as in
> > +     * p2m_pod_zero_check_superpage(): a vCPU can hold only a few transient
> > +     * mappings at once, and the p2m lookups and updates here need some 
> > too.
> > +     */
>
> Actually, I think this wants almost entirely dropping.   Yes, "and maps
> the pages." needs editing, and should probably say "and check for being
> a plausible candidate" or so, which was missing previously.
>
> The rest is a justification of why we do mapping in the same way we do
> it generally, and not useful to have in the source code.

Yes, sorry about the verbose comment, I forgot to go back and give
this a more detailed review.  I'll trim back the comment.

Re the bool array: I assumed the compiler would turn that into a
bitmask.  That not being the case, I'll switch to bitops.

Thanks,
 -George



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.