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

Re: [Xen-devel] PVH dom0 memory setup



On Fri, Sep 08, 2017 at 03:04:30PM -0400, Boris Ostrovsky wrote:
> On 09/08/2017 01:11 PM, Roger Pau Monné wrote:
> > On Fri, Sep 08, 2017 at 10:56:33AM -0400, Boris Ostrovsky wrote:
> >> I am slightly confused by the use of 'need_paging' variable in
> >> dom0_compute_nr_pages().
> >>
> >> Because paging_mode_hap() and iommu_hap_pt_share are (almost?) always
> >> true, we are not reducing available memory for PVH dom0 by page tables
> >> size. But then in pvh_setup_p2m() we do use this memory by
> >> paging_set_allocation(). And from what I've seen we then may run our of
> >> heap pages when populating memory map (in the 'for' loop below).
> >>
> >> Am I not reading this correctly?
> > Yes, I think you are reading this correctly. dom0_compute_nr_pages
> > should set need_paging if the domain type is hvm AFAICT, because hap
> > also consumes memory for it's page tables. Do you have a reliable way
> > to trigger this?
> >
> > I was thinking of a fix along the lines of:
> 
> Yes, this is essentially what I ended up doing and yes it does fix this
> problem.
> 
> I wasn't sure whether this would work for !HAP case (which we still
> support).

It should work fine in both cases, but we should check whether the
calculation of the reservation is done in the same way as libxl.

AFAICT even with the change proposed I don't think
dom0_compute_nr_pages will handle the !iommu_hap_pt_share case
properly (ie: I don't see specific memory for the IOMMU pages tables
being reserved anywhere).

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®.