aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel/cache.c
diff options
context:
space:
mode:
authorLu Baolu <[email protected]>2025-06-28 10:03:51 +0000
committerJoerg Roedel <[email protected]>2025-07-04 08:33:56 +0000
commit25b1b75bbaf96331750fb01302825069657b2ff8 (patch)
treecf7fd4d5cd57d8807ff2c6e3dac6193893bac80a /drivers/iommu/intel/cache.c
parentiommu/rockchip: prevent iommus dead loop when two masters share one IOMMU (diff)
downloadkernel-25b1b75bbaf96331750fb01302825069657b2ff8.tar.gz
kernel-25b1b75bbaf96331750fb01302825069657b2ff8.zip
iommu/vt-d: Assign devtlb cache tag on ATS enablement
Commit <4f1492efb495> ("iommu/vt-d: Revert ATS timing change to fix boot failure") placed the enabling of ATS in the probe_finalize callback. This occurs after the default domain attachment, which is when the ATS cache tag is assigned. Consequently, the device TLB cache tag is missed when the domain is attached, leading to the device TLB not being invalidated in the iommu_unmap paths. Fix this by assigning the CACHE_TAG_DEVTLB cache tag when ATS is enabled. Fixes: 4f1492efb495 ("iommu/vt-d: Revert ATS timing change to fix boot failure") Cc: [email protected] Suggested-by: Kevin Tian <[email protected]> Signed-off-by: Lu Baolu <[email protected]> Tested-by: Shuicheng Lin <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'drivers/iommu/intel/cache.c')
-rw-r--r--drivers/iommu/intel/cache.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iommu/intel/cache.c b/drivers/iommu/intel/cache.c
index fc35cba59145..47692cbfaabd 100644
--- a/drivers/iommu/intel/cache.c
+++ b/drivers/iommu/intel/cache.c
@@ -40,9 +40,8 @@ static bool cache_tage_match(struct cache_tag *tag, u16 domain_id,
}
/* Assign a cache tag with specified type to domain. */
-static int cache_tag_assign(struct dmar_domain *domain, u16 did,
- struct device *dev, ioasid_t pasid,
- enum cache_tag_type type)
+int cache_tag_assign(struct dmar_domain *domain, u16 did, struct device *dev,
+ ioasid_t pasid, enum cache_tag_type type)
{
struct device_domain_info *info = dev_iommu_priv_get(dev);
struct intel_iommu *iommu = info->iommu;