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-v5.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:

- fix device setup failures in the Intel VT-d driver when the PASID
table is shared

- fix Intel VT-d device hot-add failure due to wrong device notifier
order

- remove the old IOMMU mailing list from the MAINTAINERS file now that
it has been retired

* tag 'iommu-fixes-v5.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
MAINTAINERS: Remove iommu@lists.linux-foundation.org
iommu/vt-d: Fix RID2PASID setup/teardown failure
iommu/vt-d: Fix PCI bus rescan device hot add

+4 -106
-11
MAINTAINERS
··· 426 426 ACPI VIOT DRIVER 427 427 M: Jean-Philippe Brucker <jean-philippe@linaro.org> 428 428 L: linux-acpi@vger.kernel.org 429 - L: iommu@lists.linux-foundation.org 430 429 L: iommu@lists.linux.dev 431 430 S: Maintained 432 431 F: drivers/acpi/viot.c ··· 959 960 AMD IOMMU (AMD-VI) 960 961 M: Joerg Roedel <joro@8bytes.org> 961 962 R: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> 962 - L: iommu@lists.linux-foundation.org 963 963 L: iommu@lists.linux.dev 964 964 S: Maintained 965 965 T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git ··· 6053 6055 M: Christoph Hellwig <hch@lst.de> 6054 6056 M: Marek Szyprowski <m.szyprowski@samsung.com> 6055 6057 R: Robin Murphy <robin.murphy@arm.com> 6056 - L: iommu@lists.linux-foundation.org 6057 6058 L: iommu@lists.linux.dev 6058 6059 S: Supported 6059 6060 W: http://git.infradead.org/users/hch/dma-mapping.git ··· 6065 6068 6066 6069 DMA MAPPING BENCHMARK 6067 6070 M: Xiang Chen <chenxiang66@hisilicon.com> 6068 - L: iommu@lists.linux-foundation.org 6069 6071 L: iommu@lists.linux.dev 6070 6072 F: kernel/dma/map_benchmark.c 6071 6073 F: tools/testing/selftests/dma/ ··· 7649 7653 7650 7654 EXYNOS SYSMMU (IOMMU) driver 7651 7655 M: Marek Szyprowski <m.szyprowski@samsung.com> 7652 - L: iommu@lists.linux-foundation.org 7653 7656 L: iommu@lists.linux.dev 7654 7657 S: Maintained 7655 7658 F: drivers/iommu/exynos-iommu.c ··· 10073 10078 INTEL IOMMU (VT-d) 10074 10079 M: David Woodhouse <dwmw2@infradead.org> 10075 10080 M: Lu Baolu <baolu.lu@linux.intel.com> 10076 - L: iommu@lists.linux-foundation.org 10077 10081 L: iommu@lists.linux.dev 10078 10082 S: Supported 10079 10083 T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git ··· 10452 10458 IOMMU DRIVERS 10453 10459 M: Joerg Roedel <joro@8bytes.org> 10454 10460 M: Will Deacon <will@kernel.org> 10455 - L: iommu@lists.linux-foundation.org 10456 10461 L: iommu@lists.linux.dev 10457 10462 S: Maintained 10458 10463 T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git ··· 12611 12618 12612 12619 MEDIATEK IOMMU DRIVER 12613 12620 M: Yong Wu <yong.wu@mediatek.com> 12614 - L: iommu@lists.linux-foundation.org 12615 12621 L: iommu@lists.linux.dev 12616 12622 L: linux-mediatek@lists.infradead.org (moderated for non-subscribers) 12617 12623 S: Supported ··· 16662 16670 16663 16671 QUALCOMM IOMMU 16664 16672 M: Rob Clark <robdclark@gmail.com> 16665 - L: iommu@lists.linux-foundation.org 16666 16673 L: iommu@lists.linux.dev 16667 16674 L: linux-arm-msm@vger.kernel.org 16668 16675 S: Maintained ··· 19290 19299 19291 19300 SWIOTLB SUBSYSTEM 19292 19301 M: Christoph Hellwig <hch@infradead.org> 19293 - L: iommu@lists.linux-foundation.org 19294 19302 L: iommu@lists.linux.dev 19295 19303 S: Supported 19296 19304 W: http://git.infradead.org/users/hch/dma-mapping.git ··· 21965 21975 M: Juergen Gross <jgross@suse.com> 21966 21976 M: Stefano Stabellini <sstabellini@kernel.org> 21967 21977 L: xen-devel@lists.xenproject.org (moderated for non-subscribers) 21968 - L: iommu@lists.linux-foundation.org 21969 21978 L: iommu@lists.linux.dev 21970 21979 S: Supported 21971 21980 F: arch/x86/xen/*swiotlb*
+1 -1
drivers/iommu/intel/dmar.c
··· 382 382 383 383 static struct notifier_block dmar_pci_bus_nb = { 384 384 .notifier_call = dmar_pci_bus_notifier, 385 - .priority = INT_MIN, 385 + .priority = 1, 386 386 }; 387 387 388 388 static struct dmar_drhd_unit *
-24
drivers/iommu/intel/iommu.c
··· 320 320 DEFINE_SPINLOCK(device_domain_lock); 321 321 static LIST_HEAD(device_domain_list); 322 322 323 - /* 324 - * Iterate over elements in device_domain_list and call the specified 325 - * callback @fn against each element. 326 - */ 327 - int for_each_device_domain(int (*fn)(struct device_domain_info *info, 328 - void *data), void *data) 329 - { 330 - int ret = 0; 331 - unsigned long flags; 332 - struct device_domain_info *info; 333 - 334 - spin_lock_irqsave(&device_domain_lock, flags); 335 - list_for_each_entry(info, &device_domain_list, global) { 336 - ret = fn(info, data); 337 - if (ret) { 338 - spin_unlock_irqrestore(&device_domain_lock, flags); 339 - return ret; 340 - } 341 - } 342 - spin_unlock_irqrestore(&device_domain_lock, flags); 343 - 344 - return 0; 345 - } 346 - 347 323 const struct iommu_ops intel_iommu_ops; 348 324 349 325 static bool translation_pre_enabled(struct intel_iommu *iommu)
+3 -66
drivers/iommu/intel/pasid.c
··· 86 86 /* 87 87 * Per device pasid table management: 88 88 */ 89 - static inline void 90 - device_attach_pasid_table(struct device_domain_info *info, 91 - struct pasid_table *pasid_table) 92 - { 93 - info->pasid_table = pasid_table; 94 - list_add(&info->table, &pasid_table->dev); 95 - } 96 - 97 - static inline void 98 - device_detach_pasid_table(struct device_domain_info *info, 99 - struct pasid_table *pasid_table) 100 - { 101 - info->pasid_table = NULL; 102 - list_del(&info->table); 103 - } 104 - 105 - struct pasid_table_opaque { 106 - struct pasid_table **pasid_table; 107 - int segment; 108 - int bus; 109 - int devfn; 110 - }; 111 - 112 - static int search_pasid_table(struct device_domain_info *info, void *opaque) 113 - { 114 - struct pasid_table_opaque *data = opaque; 115 - 116 - if (info->iommu->segment == data->segment && 117 - info->bus == data->bus && 118 - info->devfn == data->devfn && 119 - info->pasid_table) { 120 - *data->pasid_table = info->pasid_table; 121 - return 1; 122 - } 123 - 124 - return 0; 125 - } 126 - 127 - static int get_alias_pasid_table(struct pci_dev *pdev, u16 alias, void *opaque) 128 - { 129 - struct pasid_table_opaque *data = opaque; 130 - 131 - data->segment = pci_domain_nr(pdev->bus); 132 - data->bus = PCI_BUS_NUM(alias); 133 - data->devfn = alias & 0xff; 134 - 135 - return for_each_device_domain(&search_pasid_table, data); 136 - } 137 89 138 90 /* 139 91 * Allocate a pasid table for @dev. It should be called in a ··· 95 143 { 96 144 struct device_domain_info *info; 97 145 struct pasid_table *pasid_table; 98 - struct pasid_table_opaque data; 99 146 struct page *pages; 100 147 u32 max_pasid = 0; 101 - int ret, order; 102 - int size; 148 + int order, size; 103 149 104 150 might_sleep(); 105 151 info = dev_iommu_priv_get(dev); 106 152 if (WARN_ON(!info || !dev_is_pci(dev) || info->pasid_table)) 107 153 return -EINVAL; 108 154 109 - /* DMA alias device already has a pasid table, use it: */ 110 - data.pasid_table = &pasid_table; 111 - ret = pci_for_each_dma_alias(to_pci_dev(dev), 112 - &get_alias_pasid_table, &data); 113 - if (ret) 114 - goto attach_out; 115 - 116 155 pasid_table = kzalloc(sizeof(*pasid_table), GFP_KERNEL); 117 156 if (!pasid_table) 118 157 return -ENOMEM; 119 - INIT_LIST_HEAD(&pasid_table->dev); 120 158 121 159 if (info->pasid_supported) 122 160 max_pasid = min_t(u32, pci_max_pasids(to_pci_dev(dev)), ··· 124 182 pasid_table->table = page_address(pages); 125 183 pasid_table->order = order; 126 184 pasid_table->max_pasid = 1 << (order + PAGE_SHIFT + 3); 127 - 128 - attach_out: 129 - device_attach_pasid_table(info, pasid_table); 185 + info->pasid_table = pasid_table; 130 186 131 187 return 0; 132 188 } ··· 142 202 return; 143 203 144 204 pasid_table = info->pasid_table; 145 - device_detach_pasid_table(info, pasid_table); 146 - 147 - if (!list_empty(&pasid_table->dev)) 148 - return; 205 + info->pasid_table = NULL; 149 206 150 207 /* Free scalable mode PASID directory tables: */ 151 208 dir = pasid_table->table;
-1
drivers/iommu/intel/pasid.h
··· 74 74 void *table; /* pasid table pointer */ 75 75 int order; /* page order of pasid table */ 76 76 u32 max_pasid; /* max pasid */ 77 - struct list_head dev; /* device list */ 78 77 }; 79 78 80 79 /* Get PRESENT bit of a PASID directory entry. */
-3
include/linux/intel-iommu.h
··· 612 612 struct device_domain_info { 613 613 struct list_head link; /* link to domain siblings */ 614 614 struct list_head global; /* link to global list */ 615 - struct list_head table; /* link to pasid table */ 616 615 u32 segment; /* PCI segment number */ 617 616 u8 bus; /* PCI bus number */ 618 617 u8 devfn; /* PCI devfn number */ ··· 728 729 void *alloc_pgtable_page(int node); 729 730 void free_pgtable_page(void *vaddr); 730 731 struct intel_iommu *domain_get_iommu(struct dmar_domain *domain); 731 - int for_each_device_domain(int (*fn)(struct device_domain_info *info, 732 - void *data), void *data); 733 732 void iommu_flush_write_buffer(struct intel_iommu *iommu); 734 733 int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct device *dev); 735 734 struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn);