Skip to contentSkip to conversation

agp: use DMA API when compiled for Xen as well

PATCH New Jeremy Fitzhardinge 1 participant 1 message Nov 12, 2010 Agpgart driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 agp: use DMA API when compiled for Xen as well

Xen guests need translation between pseudo-physical and real machine physical addresses when accessing graphics devices, so use the DMA API in that case too.

drivers/char/agp/intel-gtt.c +5 -1
index 75e0a34..ce63e5c 100644
@@ -20,8 +20,12 @@
  * an Intel IOMMU. So make the correct use of the PCI DMA API contingent
  * on the Intel IOMMU support (CONFIG_DMAR).
  * Only newer chipsets need to bother with this, of course.
+ *
+ * Xen guests accessing graphics hardware also need proper translation
+ * between pseudo-physical addresses and real machine addresses, which
+ * is also achieved by using the DMA API.
  */
-#ifdef CONFIG_DMAR
+#if defined(CONFIG_DMAR) || defined(CONFIG_XEN)
 #define USE_PCI_DMA_API 1
 #endif