[PATCH v8 13/14] iommu/arm-smmu-v3: Report events that belong to devices attached to vIOMMU
Nicolin Chen
nicolinc at nvidia.com
Tue Mar 11 09:26:50 PDT 2025
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:
> > @@ -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 at kernel.org>
Thanks!
Nicolin
More information about the linux-arm-kernel
mailing list