RE: [PATCH v2 1/7] iommu: Do not call pci_dev_reset_iommu_done() unless reset succeeds

Tian, Kevin
2026-03-18T07:21:57Z

> From: Nicolin Chen <nicolinc@nvidia.com>
> Sent: Wednesday, March 18, 2026 3:16 AM
>
> @@ -977,7 +978,15 @@ int pci_dev_acpi_reset(struct pci_dev *dev, bool
> probe)
> ret = -ENOTTY;
> }
>
> - pci_dev_reset_iommu_done(dev);
> + /*
> + * The reset might be invoked to recover a serious error. E.g. when
> the
> + * ATC failed to invalidate its stale entries, which can result in data
> + * corruption. Thus, do not unblock ATS until a successful reset.
> + */
> + if (!ret || !pci_ats_supported(dev))
> + pci_dev_reset_iommu_done(dev);
> + else
> + pci_warn(dev, "Reset failed. Blocking ATS to protect
> memory\n");
> return ret;

let's pass the reset status to pci_dev_reset_iommu_done() then
put above detail inside.