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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

Thanks!

Nicolin




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux