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

Re: [Xen-devel] [PATCH v5 16/23] x86/mm: add pv prefix to {alloc, free}_page_type

On Fri, Sep 22, 2017 at 08:24:20AM -0600, Jan Beulich wrote:
> >>> On 22.09.17 at 16:07, <wei.liu2@xxxxxxxxxx> wrote:
> > On Fri, Sep 22, 2017 at 07:40:04AM -0600, Jan Beulich wrote:
> >> Additionally could you add (half) a sentence regarding the
> >> PGT_l*_page_table uses outside of PV specific code, which I'm
> >> sure you have verified can't make it into the stubs?
> > 
> > At this stage I can only verify it by reading the code. I can't turn off
> > PV yet.
> Of course, that's what I did mean.
> > To allocate a PGT_l*_page_table type page, the guest must explicitly
> > request such types via PV MMU hypercall; there is no code other than the
> > PV dom0 builder and p2m_alloc_ptp  in the hypervisor would explicitly
> > ask for PGT_l*_page_table type pages.
> > 
> > p2m_alloc_table is a bit tricky. I think it can get away with not using
> > PGT_l*_page_table type pages, but that is work for another day.  Anyway,
> > currently it frees the pages directly with free_page from different
> > paging modes, all of which won't go into PV mm code.
> Right, hence the request to extend the description a little.
> shadow_enable() also has a use that's not so obviously not
> a problem.

The call chain is paging_enable -> shadow_enable. paging_enable is only
called by hvm code.

The teardown in shadow_final_teardown is also done with p2m_teardown
which goes to free_page function in respective paging modes.

All in all, it is not a problem in that code path either.

Xen-devel mailing list



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