Skip to content
Commit 7c29ada5 authored by Liu Yi L's avatar Liu Yi L Committed by Will Deacon
Browse files

iommu/vt-d: Fix ineffective devTLB invalidation for subdevices



iommu_flush_dev_iotlb() is called to invalidate caches on a device but
only loops over the devices which are fully-attached to the domain. For
sub-devices, this is ineffective and can result in invalid caching
entries left on the device.

Fix the missing invalidation by adding a loop over the subdevices and
ensuring that 'domain->has_iotlb_device' is updated when attaching to
subdevices.

Fixes: 67b8e02b ("iommu/vt-d: Aux-domain specific domain attach/detach")
Signed-off-by: default avatarLiu Yi L <yi.l.liu@intel.com>
Acked-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/1609949037-25291-4-git-send-email-yi.l.liu@intel.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 18abda7a
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