Re: [PATCH v13 07/13] iommu/vt-d: Add SVA domain support

From: Baolu Lu
Date: Fri Sep 23 2022 - 08:42:10 EST


On 2022/9/23 20:15, Jason Gunthorpe wrote:
On Fri, Sep 23, 2022 at 10:21:51AM +0800, Baolu Lu wrote:

At the beginning of this project, I wanted to consolidate the mm
notifications into the core. However, ARM SMMUv3 and Intel handle the mm
notifications a little differently. Then I decided to do this work
separately from the current series.

It doesn't look really different..

They are essentially the same, but slightly different. For example, arm
smmuv3 provides .free_notifier, and I don't think it could be merged to
the release callback.


The SVA iommu domain needs two new ops triggered by the notifier:

- 'stop using the mm, subsitute a blocking domain' tied to release
- Cache invalidate a range, maybe this is just iotlb_sync_map()

And we could even think about the first as the core code literally
attaching a dummy blocking domain and releasing the SVA domain. There
is no reason we need to have every driver do this tricky bit of
lifecycle management.

Yes. I have similar ideas. We can further discuss it with the real code
later.

Best regards,
baolu