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] merge error in intel_agp_insert_sg_entries() in xen.git

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] merge error in intel_agp_insert_sg_entries() in xen.git
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Sat, 12 Mar 2011 15:25:17 +0100
Delivery-date: Sat, 12 Mar 2011 06:26:31 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1299939927; l=1647; s=domk; d=aepfle.de; h=Content-Type:MIME-Version:Subject:To:From:Date:X-RZG-CLASS-ID: X-RZG-AUTH; bh=Y96R+KMlSCLqCTf+m/oKIYLrcdg=; b=Eo8zUlvAeqQZRJerddeG1CcWEmnCSgwVdqyLNZaxTggo3/mbw71FQkVE+G8CxMpzNat kzekHUl1Bx/j8xFq3Oh3nzOAMvDS5gGFDo8+uuNwRrq9pbK3QvL1Es1jlyucO6IY8O9kU aBUr2lPlYe4vdb4ML1j2geQZHKVjsiwepTU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
There is a missing } in one of the patches for
drivers/char/agp/intel-agp.c:intel_agp_insert_sg_entries() in xen.git.
The diff I get looks like this:

--- linux-2.6.32/drivers/char/agp/intel-agp.c
+++ linux-2.6-jeremy-xen-stable-2.6.32.x/drivers/char/agp/intel-agp.c
@@ -10,14 +10,20 @@
 #include <linux/agp_backend.h>
 #include <asm/smp.h>
 #include "agp.h"
+#include <xen/page.h>
+#include <asm/xen/page.h>

 /*
  * If we have Intel graphics, we're not going to have anything other than
  * 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

@@ -296,8 +302,20 @@ static void intel_agp_insert_sg_entries(
        int i, j;

        for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
+               phys_addr_t phys = page_to_phys(mem->pages[i]);
+               if (xen_pv_domain()) {
+                       phys_addr_t xen_phys = PFN_PHYS(pfn_to_mfn(
+                                       page_to_pfn(mem->pages[i])));
+                       if (xen_phys != phys) {
+                               printk(KERN_ERR "Compile kernel with " \
+                                       "CONFIG_DMAR to get rid of this " \
+                                       "warning!\n");
+                               WARN_ON_ONCE(xen_phys != phys);
+                               /* Fixup: */
+                               phys = xen_phys;
+                       }
                writel(agp_bridge->driver->mask_memory(agp_bridge,
-                               page_to_phys(mem->pages[i]), mask_type),
+                               phys, mask_type),
                       intel_private.gtt+j);
        }

@@

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

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