From: Joerg Roedel Date: Thu, 21 Jun 2012 14:51:25 +0000 (+0200) Subject: iommu/amd: Make sure IOMMU is not considered to translate itself X-Git-Tag: v3.12-rc1~2223^2^6~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6fec00a9202987f1be2ae0a722518b742a9a799;p=kernel%2Fkernel-generic.git 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 --- diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 8a7f197..68b3305 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/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;