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

Tian, Kevin kevin.tian at intel.com
Wed Mar 18 00:21:53 PDT 2026


> From: Nicolin Chen <nicolinc at 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. 



More information about the linux-arm-kernel mailing list