[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] vt-d: workaround for Mobile Series 4 Chipset



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1235041183 0
# Node ID bd991b0431aad9a0e8631a09da138a4961117ef3
# Parent  0c61a377c6278c0d124617a86abfa37eba201d17
vt-d: workaround for Mobile Series 4 Chipset

Incorporated VT-d workaround for a sighting on Intel Mobile Series 4
chipset found in Linux iommu.  The sighting is the chipset is not
reporting write buffer flush capability correctly.

Signed-off-by: Allen Kay <allen.m.kay@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/iommu.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletion(-)

diff -r 0c61a377c627 -r bd991b0431aa xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Thu Feb 19 10:53:46 2009 +0000
+++ b/xen/drivers/passthrough/vtd/iommu.c       Thu Feb 19 10:59:43 2009 +0000
@@ -41,6 +41,7 @@ static spinlock_t domid_bitmap_lock;    
 static spinlock_t domid_bitmap_lock;    /* protect domain id bitmap */
 static int domid_bitmap_size;           /* domain id bitmap size in bits */
 static unsigned long *domid_bitmap;     /* iommu domain id bitmap */
+static bool_t rwbf_quirk;
 
 static void setup_dom0_devices(struct domain *d);
 static void setup_dom0_rmrr(struct domain *d);
@@ -231,7 +232,7 @@ static void iommu_flush_write_buffer(str
     unsigned long flag;
     s_time_t start_time;
 
-    if ( !cap_rwbf(iommu->cap) )
+    if ( !rwbf_quirk && !cap_rwbf(iommu->cap) )
         return;
     val = iommu->gcmd | DMA_GCMD_WBF;
 
@@ -1719,6 +1720,19 @@ static void setup_dom0_rmrr(struct domai
     spin_unlock(&pcidevs_lock);
 }
 
+static void platform_quirks(void)
+{
+    u32 id;
+
+    /* Mobile 4 Series Chipset neglects to set RWBF capability. */
+    id = pci_conf_read32(0, 0, 0, 0);
+    if ( id == 0x2a408086 )
+    {
+        dprintk(XENLOG_INFO VTDPREFIX, "DMAR: Forcing write-buffer flush\n");
+        rwbf_quirk = 1;
+    }
+}
+
 int intel_vtd_setup(void)
 {
     struct acpi_drhd_unit *drhd;
@@ -1726,6 +1740,8 @@ int intel_vtd_setup(void)
 
     if ( !vtd_enabled )
         return -ENODEV;
+
+    platform_quirks();
 
     spin_lock_init(&domid_bitmap_lock);
     clflush_size = get_cache_line_size();

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.