]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/iommu/intel-iommu.c
iommu/vt-d: Reserve a domain id for FL and PT modes
[linux.git] / drivers / iommu / intel-iommu.c
index d55254abd5ff4b88bb2275cfd29e8e85741218c3..9818aaf2d0f73a830f34d6cc170986ee22259bae 100644 (file)
@@ -1621,6 +1621,16 @@ static int iommu_init_domains(struct intel_iommu *iommu)
         */
        set_bit(0, iommu->domain_ids);
 
+       /*
+        * Vt-d spec rev3.0 (section 6.2.3.1) requires that each pasid
+        * entry for first-level or pass-through translation modes should
+        * be programmed with a domain id different from those used for
+        * second-level or nested translation. We reserve a domain id for
+        * this purpose.
+        */
+       if (sm_supported(iommu))
+               set_bit(FLPT_DEFAULT_DID, iommu->domain_ids);
+
        return 0;
 }