Re: [PATCH v3 03/11] iommu: Add reset_device_done callback for hardware fault recovery

From: Baolu Lu

Date: Thu Apr 23 2026 - 22:42:34 EST


On 4/17/26 07:28, Nicolin Chen wrote:
When an IOMMU hardware detects an error due to a faulty device (e.g. an ATS
invalidation timeout), IOMMU drivers may quarantine the device by disabling
specific hardware features or dropping translation capabilities.

To recover from these states, the IOMMU driver needs a reliable signal that
the underlying physical hardware has been cleanly reset (e.g., via PCIe AER
or a sysfs Function Level Reset) so as to lift the quarantine.

Introduce a reset_device_done callback in struct iommu_ops. Trigger it from
the existing pci_dev_reset_iommu_done() path to notify the underlying IOMMU
driver that the device's internal state has been sanitized.

Signed-off-by: Nicolin Chen<nicolinc@xxxxxxxxxx>
---
include/linux/iommu.h | 4 ++++
drivers/iommu/iommu.c | 12 ++++++++++++
2 files changed, 16 insertions(+)

Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>