2023-08-03 11:03:20

by Michael Shavit

[permalink] [raw]
Subject: Re: [PATCH v5 5/6] iommu/arm-smmu-v3: Free pasid domains on iommu release

On Thu, Aug 3, 2023 at 6:14 PM Michael Shavit <[email protected]> wrote:
>
> The iommu core doesn't guarantee that pasid domains will be detached
> before the device is released.

I'm not certain whether this is possible or not. Is this change really
necessary?


2023-08-03 17:45:24

by Jason Gunthorpe

[permalink] [raw]
Subject: Re: [PATCH v5 5/6] iommu/arm-smmu-v3: Free pasid domains on iommu release

On Thu, Aug 03, 2023 at 06:17:15PM +0800, Michael Shavit wrote:
> On Thu, Aug 3, 2023 at 6:14 PM Michael Shavit <[email protected]> wrote:
> >
> > The iommu core doesn't guarantee that pasid domains will be detached
> > before the device is released.
>
> I'm not certain whether this is possible or not. Is this change really
> necessary?

I think we should rely on the core code to detach all PASIDs prior to
calling release, drivers should not do this. I suppose that means we
have a missing bit in the core code.

FWIW, I'd like to get to a point where the core code can also
automatically attach an identity domain so that the driver's release
functions don't have to open code that either...

Thus I wouldn't do this patch..

Jason