aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-07-30 05:24:45 -0400
committerJoerg Roedel <jroedel@suse.de>2015-07-31 09:15:41 -0400
commit1c1cc454aa694a89572689515fdaaf27b8c9f42a (patch)
treebe9e39d560b43f03240b5271d49f00676d456b13 /drivers/iommu/amd_iommu.c
parent52717828356b643a1650fca845b4af488a954cca (diff)
iommu/amd: Allow non-ATS devices in IOMMUv2 domains
With the grouping of multi-function devices a non-ATS capable device might also end up in the same domain as an IOMMUv2 capable device. So handle this situation gracefully and don't consider it a bug anymore. Tested-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r--drivers/iommu/amd_iommu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index fa9508bb76dd..658ee39e6569 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3318,7 +3318,12 @@ static int __flush_pasid(struct protection_domain *domain, int pasid,
3318 struct amd_iommu *iommu; 3318 struct amd_iommu *iommu;
3319 int qdep; 3319 int qdep;
3320 3320
3321 BUG_ON(!dev_data->ats.enabled); 3321 /*
3322 There might be non-IOMMUv2 capable devices in an IOMMUv2
3323 * domain.
3324 */
3325 if (!dev_data->ats.enabled)
3326 continue;
3322 3327
3323 qdep = dev_data->ats.qdep; 3328 qdep = dev_data->ats.qdep;
3324 iommu = amd_iommu_rlookup_table[dev_data->devid]; 3329 iommu = amd_iommu_rlookup_table[dev_data->devid];