From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: pvh dom0: memory leak from iomem map Date: Thu, 5 Jun 2014 19:12:49 -0700 Message-ID: <20140605191249.4260455f@mantra.us.oracle.com> References: <20140603182948.073180cf@mantra.us.oracle.com> <20140605092032.GA8657@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140605092032.GA8657@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: "Xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Thu, 5 Jun 2014 11:20:32 +0200 Tim Deegan wrote: > At 18:29 -0700 on 03 Jun (1401816588), Mukesh Rathor wrote: > > Hi Tim, > > > > When building a dom0 pvh, we populate the p2m with 0..N pfns > > upfront. Then in pvh_map_all_iomem, we walk the e820 and map all > > iomem 1:1. As such any iomem range below N would cause those ram > > frames to be silently dropped. Since the holes could be pretty big, > > I am concenred this could result in significant loss of frames. > > Right. So, er, don't do that then? :) You have all the information > you need available at the time that you build dom0's p2m, so why not I thought about that, and wasn't sure how easy it would be to change construct_dom0 for that purpose. It's common for both PV and PVH, and is pretty messy as is. Anyways, Roger has already done the work of reusing the frames via snooping into M2P, and repopulating those frames that got invalidated when mapping iomem 1:1. We don't have any case where a frame is used for some special purpose and does not have a mapping in the M2P, right? Otherwise, his code would be broken.... thanks, Mukesh