From mboxrd@z Thu Jan 1 00:00:00 1970 From: Qing He Subject: Re: RE: [RFC] fix xen_in_range() Date: Sat, 25 Apr 2009 07:14:16 +0800 Message-ID: <20090424231416.GA17359@ub-qhe2> References: <49F180A8.76EA.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "Cihula, Joseph" , "Cui, Dexuan" , "Wang, Shane" , "Jiang, Yunhong" , "Yang, Xiaowei" , "Ke, Liping" , "xen-devel@lists.xensource.com" , "Li, Xin" List-Id: xen-devel@lists.xenproject.org On Fri, 2009-04-24 at 15:16 +0800, Keir Fraser wrote: > On 24/04/2009 08:04, "Jan Beulich" wrote: > > > Also, after suggesting to use gb-pages when possible here I realized that > > it's probably a latent bug to map more space than was allocated - if the > > non-allocated-but-mapped pages happen to later get allocated to a domain, > > that domain may change the cacheability attributes of any of these pages, > > resulting in aliasing issues. I'll put together a patch for this, but it'll be > > a couple of days until I'll be able to do so. > > I think we should shatter the superpage on demand. This would also be > required for superpage mappings of Xen itself: when we free initmem that > memory can now be allocated to a domain (now xenheap and domheap are merged > on x86/64). Actually, we just found an example that problems can arise here. Just it's not the superpage shattering, but unused __per_cpu area. Dom0 actually gets these pages and tries to do DMA on them, which causes VT-d page fault and dom0 boot failure. I have a patch for it adding this part to iommu page table. Thanks, Qing > > An alternative might be to mark such partially-freed superpages as > Xenheap-only, and allocate them preferentially for Xenheap callers (i.e., > alloc those pages first, then from the general heap). > > -- Keir > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel