Re: [PATCH v3 04/19] iommufd: Add a flag to enforce dirty tracking on attach

Jason Gunthorpe
2023-10-13T16:18:44Z

On Fri, Oct 13, 2023 at 05:14:26PM +0100, Joao Martins wrote:
> >> hwpt = iommufd_object_alloc(ictx, hwpt, IOMMUFD_OBJ_HW_PAGETABLE);
> >> @@ -157,7 +159,9 @@ int iommufd_hwpt_alloc(struct iommufd_ucmd *ucmd)
> >> struct iommufd_ioas *ioas;
> >> int rc;
> >>
> >> - if (cmd->flags & ~IOMMU_HWPT_ALLOC_NEST_PARENT || cmd->__reserved)
> >> + if ((cmd->flags &
> >> + ~(IOMMU_HWPT_ALLOC_NEST_PARENT|IOMMU_HWPT_ALLOC_ENFORCE_DIRTY)) ||
> >> + cmd->__reserved)
> >> return -EOPNOTSUPP;
> >
> > Please checkpatch your stuff,
>
> I always do this, and there was no issues reported on this patch.

Really? The missing spaces around ' | ' are not kernel style..

Jason