WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [RFC PATCH 0/3] AMD IOMMU: Share p2m table with iommu

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC PATCH 0/3] AMD IOMMU: Share p2m table with iommu
From: Wei Wang2 <wei.wang2@xxxxxxx>
Date: Mon, 23 May 2011 14:08:49 +0200
Cc: "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Kay, Allen M" <allen.m.kay@xxxxxxxxx>
Delivery-date: Mon, 23 May 2011 05:11:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110523105800.GC12801@xxxxxxxxxxxxxxxxxxxxxxx>
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: <4D8C6F13.6020208@xxxxxxx> <987664A83D2D224EAE907B061CE93D5301D5BF7D34@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110523105800.GC12801@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 20070904.708012)
On Monday 23 May 2011 12:58:00 Tim Deegan wrote:
> Hi,
>
> At 01:51 +0100 on 21 May (1305942710), Kay, Allen M wrote:
> > The common code that caused problem is the following.
> >
> > typedef enum {
> > -    p2m_invalid = 0,            /* Nothing mapped here */
> > -    p2m_ram_rw = 1,             /* Normal read/write guest RAM */
> > +    p2m_ram_rw = 0,             /* Normal read/write guest RAM */
> > +    p2m_invalid = 1,            /* Nothing mapped here */
> >
> > With the above change, guest with device direct assignment fails to
> > boot.  QEMU VGA displays some weird color patterns.
>
> Unfortunately this change seems to be necessary for AMD IOMMU to share
> pagetables with the p2m.  I'd rather we didn't have it, because it means
> empty ptes look like RAM mappings of frame 0. :(
>
> Wei, is there any way we can reorganise the AMD IOMMU pagetables so we
> can store the p2m type somewhere that's not required to be zero?  If
> not, I'm inclined to revert the p2m-sharing for AMD IOMMUs, since at the
> very least we'd like to be able to handle types other than ram_rw
> (e.g. ram_ro).
Tim,
Theoretically, we just need to keep bit 52 - bit 58 all zero for valid dma 
translation entry. Probably we could  define ram_rw as 11000000000b, 
which is the valid r/w permission for iommu and leaves bit 52 - 58 zero? 
Thanks,
Wei

> In the meantime, Allen, does the attached patch make things any better
> for you?
>
> Cheers,
>
> Tim.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>