Re: [PATCH V1 2/4] PCI: Don't run IOMMU reset hooks when only probing reset methods
From: Nicolin Chen
Date: Thu Nov 19 2026 - 11:39:53 EST
On Thu, Nov 19, 2026 at 03:36:26PM +0530, Vidya Sagar wrote:
> pci_reset_bus_function() and __pci_dev_specific_reset() call
> pci_dev_reset_iommu_prepare() and pci_dev_reset_iommu_done() even when
> "probe" is set and no reset follows. The other reset methods that use
> these hooks, pcie_flr(), pci_af_flr(), pci_pm_reset() and
> pci_dev_acpi_reset(), only call them when actually resetting.
>
> Reset methods are probed at enumeration, before the IOMMU is set up, but
> also whenever "reset_method" is written in sysfs. For an ATS-capable
> device behind an IOMMU, each such probe of "bus" or of a device-specific
> reset attaches the blocking domain and then re-attaches the device's
> domains. That blocks any DMA in the window and, on arm-smmu-v3, sends
> ATC invalidations, even while a driver is bound and using the device.
>
> Return before the IOMMU hooks when probing, as the other reset methods
> do.
>
> Fixes: f5b16b802174 ("PCI: Suspend iommu function prior to resetting a device")
We already have a similar fix here that Bjorn acked:
https://lore.kernel.org/linux-iommu/c66d5221a8e4356316d4f614c8584a80dc9d71b6.1793729707.git.nicolinc@xxxxxxxxxx/
I am waiting for Joerg to take the series.
Nicolin