Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'iommu-fixes-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux

Pull iommu fixes from Joerg Roedel:

- Rockchip: fix infinite loop caused by probing race condition

- Intel VT-d: assign devtlb cache tag on ATS enablement

* tag 'iommu-fixes-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux:
iommu/vt-d: Assign devtlb cache tag on ATS enablement
iommu/rockchip: prevent iommus dead loop when two masters share one IOMMU

+16 -5
+2 -3
drivers/iommu/intel/cache.c
··· 40 40 } 41 41 42 42 /* Assign a cache tag with specified type to domain. */ 43 - static int cache_tag_assign(struct dmar_domain *domain, u16 did, 44 - struct device *dev, ioasid_t pasid, 45 - enum cache_tag_type type) 43 + int cache_tag_assign(struct dmar_domain *domain, u16 did, struct device *dev, 44 + ioasid_t pasid, enum cache_tag_type type) 46 45 { 47 46 struct device_domain_info *info = dev_iommu_priv_get(dev); 48 47 struct intel_iommu *iommu = info->iommu;
+10 -1
drivers/iommu/intel/iommu.c
··· 3780 3780 !pci_enable_pasid(to_pci_dev(dev), info->pasid_supported & ~1)) 3781 3781 info->pasid_enabled = 1; 3782 3782 3783 - if (sm_supported(iommu) && !dev_is_real_dma_subdevice(dev)) 3783 + if (sm_supported(iommu) && !dev_is_real_dma_subdevice(dev)) { 3784 3784 iommu_enable_pci_ats(info); 3785 + /* Assign a DEVTLB cache tag to the default domain. */ 3786 + if (info->ats_enabled && info->domain) { 3787 + u16 did = domain_id_iommu(info->domain, iommu); 3788 + 3789 + if (cache_tag_assign(info->domain, did, dev, 3790 + IOMMU_NO_PASID, CACHE_TAG_DEVTLB)) 3791 + iommu_disable_pci_ats(info); 3792 + } 3793 + } 3785 3794 iommu_enable_pci_pri(info); 3786 3795 } 3787 3796
+2
drivers/iommu/intel/iommu.h
··· 1289 1289 unsigned int users; 1290 1290 }; 1291 1291 1292 + int cache_tag_assign(struct dmar_domain *domain, u16 did, struct device *dev, 1293 + ioasid_t pasid, enum cache_tag_type type); 1292 1294 int cache_tag_assign_domain(struct dmar_domain *domain, 1293 1295 struct device *dev, ioasid_t pasid); 1294 1296 void cache_tag_unassign_domain(struct dmar_domain *domain,
+2 -1
drivers/iommu/rockchip-iommu.c
··· 1157 1157 return -ENOMEM; 1158 1158 1159 1159 data->iommu = platform_get_drvdata(iommu_dev); 1160 - data->iommu->domain = &rk_identity_domain; 1161 1160 dev_iommu_priv_set(dev, data); 1162 1161 1163 1162 platform_device_put(iommu_dev); ··· 1193 1194 iommu = devm_kzalloc(dev, sizeof(*iommu), GFP_KERNEL); 1194 1195 if (!iommu) 1195 1196 return -ENOMEM; 1197 + 1198 + iommu->domain = &rk_identity_domain; 1196 1199 1197 1200 platform_set_drvdata(pdev, iommu); 1198 1201 iommu->dev = dev;