Thread (48 messages) 48 messages, 6 authors, 2026-04-10

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

From: "Tian, Kevin" <kevin.tian@intel.com>
Date: 2026-03-18 07:21:57
Also in: linux-acpi, linux-iommu, linux-pci, lkml

quoted hunk ↗ jump to hunk
From: Nicolin Chen <redacted>
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. 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help