Skip to content

Commit

Permalink
iommu/amd: Allow non-ATS devices in IOMMUv2 domains
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed Jul 31, 2015
1 parent 5271782 commit 1c1cc45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3318,7 +3318,12 @@ static int __flush_pasid(struct protection_domain *domain, int pasid,
struct amd_iommu *iommu;
int qdep;

BUG_ON(!dev_data->ats.enabled);
/*
There might be non-IOMMUv2 capable devices in an IOMMUv2
* domain.
*/
if (!dev_data->ats.enabled)
continue;

qdep = dev_data->ats.qdep;
iommu = amd_iommu_rlookup_table[dev_data->devid];
Expand Down

0 comments on commit 1c1cc45

Please sign in to comment.