]> xenbits.xensource.com Git - xen.git/commitdiff
vtd: only enable Interrupt Remapping if Queued Invalidation is also enabled.
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Mar 2009 09:10:55 +0000 (09:10 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Mar 2009 09:10:55 +0000 (09:10 +0000)
If Queued Invalidation is not supported or not enabled, we should not
enable Interrupt Remapping even if HW supports it, because Interrupt
Remapping needs Queued Invalidation to invalidate Interrupt Remapping
Cache.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
xen/drivers/passthrough/vtd/iommu.c

index af58d7dc4d94c1ab5c99da320b4f6206ceca12c8..0e91915fb5fbf9ad54d0a77e31e21c65776dde4f 100644 (file)
@@ -1782,6 +1782,14 @@ int intel_vtd_setup(void)
         if ( iommu_intremap && !ecap_intr_remap(iommu->ecap) )
             iommu_intremap = 0;
     }
+
+    if ( !iommu_qinval && iommu_intremap )
+    {
+        iommu_intremap = 0;
+        gdprintk(XENLOG_WARNING VTDPREFIX, "Interrupt Remapping disabled "
+            "since Queued Invalidation isn't supported or enabled.\n");
+    }
+
 #define P(p,s) printk("Intel VT-d %s %ssupported.\n", s, (p)? "" : "not ")
     P(iommu_snoop, "Snoop Control");
     P(iommu_passthrough, "DMA Passthrough");