Thread (33 messages) 33 messages, 6 authors, 2025-04-08

Re: [PATCH v8 13/14] iommu/arm-smmu-v3: Report events that belong to devices attached to vIOMMU

From: Nicolin Chen <hidden>
Date: 2025-03-11 16:27:20
Also in: linux-doc, linux-iommu, linux-kselftest, linux-patches, lkml

On Tue, Mar 11, 2025 at 03:56:38PM +0000, Will Deacon wrote:
On Tue, Feb 25, 2025 at 09:25:41AM -0800, Nicolin Chen wrote:
quoted
@@ -1866,7 +1869,14 @@ static int arm_smmu_handle_event(struct arm_smmu_device *smmu,
 		goto out_unlock;
 	}
 
-	ret = iommu_report_device_fault(master->dev, &fault_evt);
+	if (event->stall) {
+		ret = iommu_report_device_fault(master->dev, &fault_evt);
+	} else {
+		if (master->vmaster && !event->s2)
+			ret = arm_vmaster_report_event(master->vmaster, evt);
+		else
+			ret = -EOPNOTSUPP; /* Unhandled events should be pinned */
+	}
nit: You don't need this extra indentation.
Yea, there was an extra lock in the previous version.

Fixed with:
-       if (event->stall) {
+       if (event->stall)
                ret = iommu_report_device_fault(master->dev, &fault_evt);
-       } else {
-               if (master->vmaster && !event->s2)
-                       ret = arm_vmaster_report_event(master->vmaster, evt);
-               else
-                       ret = -EOPNOTSUPP; /* Unhandled events should be pinned */
-       }
+       else    if (master->vmaster && !event->s2)
+               ret = arm_vmaster_report_event(master->vmaster, evt);
+       else
+               ret = -EOPNOTSUPP; /* Unhandled events should be pinned */
Patch looks fine:

Acked-by: Will Deacon <will@kernel.org>
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