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] [PATCH] Make x86_64 swiotlb code to support dma_ops [2/2

To: "Keir Fraser" <keir@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] [PATCH] Make x86_64 swiotlb code to support dma_ops [2/2]
From: "Langsdorf, Mark" <mark.langsdorf@xxxxxxx>
Date: Wed, 28 Feb 2007 16:19:40 -0600
Delivery-date: Wed, 28 Feb 2007 14:19:01 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C20BA7EB.30A0%keir@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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1449F58C868D8D4E9C72945771150BDFD9668D@xxxxxxxxxxxxxxxxx> <C20BA7EB.30A0%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdbdXGgPI0XllCdQlK5GGtYpF745wACUWEGAAAzDmAAAHrXhgABJCgg
Thread-topic: [Xen-devel] [PATCH] Make x86_64 swiotlb code to support dma_ops [2/2]
 

> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Keir Fraser
> Sent: Wednesday, February 28, 2007 3:43 PM
> To: Langsdorf, Mark; xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH] Make x86_64 swiotlb code to 
> support dma_ops [2/2]
> 
> On 28/2/07 21:35, "Langsdorf, Mark" <mark.langsdorf@xxxxxxx> wrote:
> 
> >> Other points that I can see from a quick browse include 
> the fact that
> >> alloc_coherent() still looks broken afaics
> > 
> > The i386 swiotlb implementation doesn't seem to have an
> > alloc_coherent().  Since all this patch is intended to do
> > is move swiotlb into the x86_64 directory, I'm not sure
> > how to resolve the broken implementation.
> 
> By pulling in a new arch/x86_64/pci-dma-xen.c you are replacing the
> implementations of things like dma_alloc_coherent().
> These replacements, being pretty much unmodified from the x86/64
> native originals, simply aren't going to work on Xen.

Oh!  Sorry for being dense.

> I'm not sure how far we'll need to deviate -- I
> suspect we'll end up with a file that look much like the 
> i386/pci-dma-xen.c
> but with calls to swiotlb_xxx() replaced with dma_ops->xxx. 
> Maybe we could
> even stick with just i386/pci-dma-xen.c and macro up the uses of
> swiotlb_xxx() (so that they can be replaced with uses of 
> dma_ops->xxx for x86/64 by cpp).

Given that pci-dma-xen for x86_64 is always going to have 
most of the functions replaced by either SWIOTLB or an
IOMMU, would it be sufficient to copy the (known good)
implementations of dma_alloc_coherent() from the i386
version?

I really don't want to get into the maintenance of the
pci-dma-xen infrastructure; I just want to be able to use
dma_ops to simplify the interaction between the 4 different
dma solutions available for AMD64 (SWIOTLB, GART, Calgary,
and the forthcoming chipset IOMMU).

-Mark Langsdorf
AMD, Inc.



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