Skip to content
Commit 8dd8f005 authored by Jean-Philippe Brucker's avatar Jean-Philippe Brucker Committed by Joerg Roedel
Browse files

iommu/arm-smmu-v3: Invalidate ATC when detaching a device



We make the invalid assumption in arm_smmu_detach_dev() that the ATC is
clear after calling pci_disable_ats(). For one thing, only enabling the
PCIe ATS capability constitutes an implicit invalidation event, so the
comment was wrong. More importantly, the ATS capability isn't necessarily
disabled by pci_disable_ats() in a PF, if the associated VFs have ATS
enabled. Explicitly invalidate all ATC entries in arm_smmu_detach_dev().
The endpoint cannot form new ATC entries because STE.EATS is clear.

Fixes: 9ce27afc ("iommu/arm-smmu-v3: Add support for PCI ATS")
Reported-by: default avatarManoj Kumar <Manoj.Kumar3@arm.com>
Reported-by: default avatarRobin Murphy <Robin.Murphy@arm.com>
Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Acked-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 900a85ca
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment