Re: [PATCH v9 3/7] iommu: Add verisilicon IOMMU driver
From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2025-09-16 13:02:43
Also in:
linux-devicetree, linux-iommu, linux-media, linux-rockchip, lkml
On Tue, Sep 16, 2025 at 09:48:33AM +0100, Will Deacon wrote:
quoted
I would strongly object to trying to share map_pages, unmap_pages, iova_to_phys, free and other iommu pt related functions in some limited way instead of helping on the much more complete iommu pt work. Which is what I said to Will, but for some reason he suggested it anyhow.If the answer is to convert this to iommu pt, then so be it. My understanding was that was still premature at this stage but you know better than me.
We are waiting for reviews, hopefull when people return from vacation. You know how hard it is to wrangle people to review it. But the code is all done, it has all been tested by multiple vendors now, many people have projects blocked on it. If this duplication is really important to you then you are welcome to help review it and merge it. As is Benjamin
When I bothered to look at this driver side-by-side with the rockchip driver which, despite apparently being totally different IP (honest!), is *remarkably* similar, I summarised the similarity in the default domain ops:
Presumably there are more HW control bits in the PTE than just valid that we don't know about..
I don't think it needs to be one or the other. afaict, these drivers should share the default domain ops and if the page-table code is using iommu-pt then that's even better.
Refactoring rockchip into an iopgtbl, and making it work with this driver is quite alot of throw away work in my view. I would not ask Benjamin to do this. This is why I offered the compromise that if he writes and tests the iommu pt version I will carry it and he can merge the driver as-is. Hopefully in a few months it can all be sorted. We can then attempt to convert rockchip as part of the followup activity to try to move drivers to iommupt. Jason