瀏覽代碼

iommu/amd: Make sure IOMMU is not considered to translate itself

The IVRS table usually includes the IOMMU device. But the
IOMMU does never translate itself, so make sure the IOMMU
driver knows this.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Joerg Roedel 13 年之前
父節點
當前提交
f6fec00a92
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      drivers/iommu/amd_iommu_init.c

+ 7 - 0
drivers/iommu/amd_iommu_init.c

@@ -1021,6 +1021,13 @@ static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h)
 	ret = init_iommu_from_acpi(iommu, h);
 	if (ret)
 		return ret;
+
+	/*
+	 * Make sure IOMMU is not considered to translate itself. The IVRS
+	 * table tells us so, but this is a lie!
+	 */
+	amd_iommu_rlookup_table[iommu->devid] = NULL;
+
 	init_iommu_devices(iommu);
 
 	return 0;