AMD Opteron and Athlon 64 processors have an AGP aperture and GART built into the processor. Linux has used the AGP GART as an IOMMU to improve the performance of 32-bit only PCI devices when DMA'ing into physical memory above 0xffffffff. This patch provides a similar capability for Xen dom0. Most of the code simply migrates the native Linux aperture.c and pci-gart.c to dom0. A new memory op is added to clear the aperture mapping from the hypervisor's page tables, which is necessary to prevent cache alias issues resulting from processor speculation. My thanks to Ulrich Meis [um@amd64.org], who was instrumental in developing and testing this patch. Signed-off-by: Mark Langsdorf