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

Re: [Xen-devel] [PATCH] x86/pvh: fix memory accounting for Dom0



On Wed, Oct 04, 2017 at 08:42:33AM +0000, Jan Beulich wrote:
> >>> On 28.09.17 at 17:55, <roger.pau@xxxxxxxxxx> wrote:
> > OK I think I'm starting to understand this. The need_paging thing it's
> > only done if the page tables are not shared because the iommu_enabled
> > has already reserved some memory for the page tables, that can be
> > shared with EPT. I think this is all very confusing, and the
> > calculations done for the iommu_enabled case are wrong. Xen should use
> > dom0_paging_pages instead.
> 
> You need to look at the history - the IOMMU part was there before
> the paging portion, I think. And yes, as indicated in an earlier reply,
> removing the IOMMU part in favor of using dom0_paging_pages()
> (and doubling the value when not sharing page tables) would seem
> preferable.

I've done this in the new version that I posted.

> > I still don't understand the need for the 'for' loop.
> 
> The second iteration of the loop uses a shrunk "avail" resulting
> from the first iteration, to make sure the remaining amount of
> memory comes reasonably close to what was requested on the
> command line. This matters specifically when quite a bit of
> memory is needed for the page tables.

Right, in the new series I was able to get rid of the loop because I
use max_pdx to calculate the amount of memory needed for the IOMMU and
p2m page-tables.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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