Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c1cc454 authored by Joerg Roedel's avatar Joerg Roedel
Browse files

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: default avatarOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 52717828
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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];