This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] RE: [RFC] fix xen_in_range()

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] RE: [RFC] fix xen_in_range()
From: Qing He <qing.he@xxxxxxxxx>
Date: Sat, 25 Apr 2009 07:14:16 +0800
Cc: "Cihula, Joseph" <joseph.cihula@xxxxxxxxx>, "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>, "Wang, Shane" <shane.wang@xxxxxxxxx>, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx>, "Ke, Liping" <liping.ke@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Fri, 24 Apr 2009 16:11:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C61725CC.9654%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <49F180A8.76EA.0078.0@xxxxxxxxxx> <C61725CC.9654%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17+20080114 (2008-01-14)
On Fri, 2009-04-24 at 15:16 +0800, Keir Fraser wrote:
> On 24/04/2009 08:04, "Jan Beulich" <jbeulich@xxxxxxxxxx> 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.

> 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@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

Xen-devel mailing list