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

Re: [PATCH v2 3/7] iommu: Add iommu_report_device_broken() to quarantine a broken device

From: Nicolin Chen <hidden>
Date: 2026-03-19 01:31:54
Also in: linux-acpi, linux-iommu, linux-pci, lkml

On Wed, Mar 18, 2026 at 02:13:09PM +0800, Baolu Lu wrote:
On 3/18/26 03:15, Nicolin Chen wrote:
quoted
+	scoped_guard(mutex, &group->mutex) {
+		/* Do not block the device again if it has been recovered */
+		if (!READ_ONCE(group->requires_reset))
+			goto out_put;
+		if (list_is_singular(&group->devices)) {
+			/* Note: only support group with a single device */
+			dev = iommu_group_first_dev(group);
+			if (dev_is_pci(dev)) {
+				pdev = to_pci_dev(dev);
+				pci_dev_get(pdev);
+			}
+		}
The current mechanism is designed only for the PCIe devices within
singleton iommu groups. How about moving the above check to
iommu_report_device_broken() and emitting a message if it is called for
unsupported devices?
Yes. That would be cleaner.

Thanks
Nicolin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help