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

[Xen-devel] [PATCH] Make AMD GART work as a mini IOMMU [2/4]

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Make AMD GART work as a mini IOMMU [2/4]
From: "Langsdorf, Mark" <mark.langsdorf@xxxxxxx>
Date: Mon, 5 Mar 2007 15:05:48 -0600
Delivery-date: Mon, 05 Mar 2007 13:06:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acdfagxrb6paSQKuSNWAML+5Mmzkyw==
Thread-topic: [PATCH] Make AMD GART work as a mini IOMMU [2/4]
Every AMD processor has an AGP aperture and 
Graphics Address Transalation Table (GART) built
into its Northbridge.  The aperture is a
physically contiguous range of memory addresses
under 0xFFFFFFFF that devices can write to; the
GART is a table that translates GART addresses 
into defined virtual addresses.  A DMA device 
can transfer data through the aperture using
32-bit accesses and have the processor automatically
transfer the data to system memory above 4GB without
needing to use software bounce buffering.  On
systems using 32-bit DMA devices, it can speed 
up I/O performance by 15-20% or more.

This patch set enables the AGP aperture and GART
in Xen dom0.  In order to do that easily and 
without interfering with the swiotlb code, it
enables dma_ops for dom0 guests and modifies 
the x86_64 pci-swiotlb-xen.c code to work with
dma_ops.

The first patch creates the 
arch/x86_64/kernel/pci-dma-xen.c file based on the 
standard pci-dma.c.

The second patch modifies 
arch/x86_64/kernel/pci-swiotlb-xen.c to work with 
dma_ops, and modifies arch/x86_64/kernel/pci-dma-xen.c
slightly to be Xen-safe by copying over some functions
from arch/i386/kernel/pci-dma-xen.c.

The third patch creates the 
arch/x86_64/kernel/pci-gart-xen.c and
arch/x86_64/kernel/aperture-xen.c files based on the
standard pci-gart.c and aperture.c files.

The fourth patch modifies pci-gart-xen.c and 
aperture-xen.c to work with Xen.  It adds a
hypervisor call to clear the aperture address
range from the hypervisor's memory tables,
which is necessary to avoid a cache coherency
issue, and ups the range of contiguous memory
that Xen provides, which is necessary since
the aperture must be at least 32 MB.

Attachment: make-pci-dma-xen-work.patch
Description: make-pci-dma-xen-work.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>