[PATCH v6 04/25] iommu/arm-smmu-v3: Move TLB range invalidation into common code

Mostafa Saleh smostafa at google.com
Thu May 7 02:40:00 PDT 2026


On Wed, May 06, 2026 at 06:53:00AM -0300, Jason Gunthorpe wrote:
> On Tue, May 05, 2026 at 04:43:13PM +0000, Mostafa Saleh wrote:
> > On Tue, May 05, 2026 at 01:17:09PM -0300, Jason Gunthorpe wrote:
> > > On Mon, May 04, 2026 at 12:15:17PM +0000, Mostafa Saleh wrote:
> > > 
> > > > I am not sure if it’s worth it, the hypervisor is much simpler, there
> > > > is a single page table, it’s locked (also identity mapped), it’s
> > > > updated on VM boot/teardown only, we don’t even use iotlb_gather at
> > > > the moment, although possible but I wanted to keep this series as
> > > > simple as I can then we can add more features later.
> > > > So this patch is the least intrusive change, as whatever the main SMMUv3
> > > > driver does, the range tlb invalidation logic is the same.
> > > > But I am happy to experiment with that when posted.
> > > 
> > > Okay, then maybe just always push a full invalidation?
> > 
> > Like full address space invalidation? that will not be optimal and
> > will affect every device on the system, why would we do that if we
> > know the address?
> 
> Not every device, just wipe the VMID. If you say it is rare then keep
> it simple. If you need to be narrow then use the proper infastructure
> with a gather. No reason to make something boutique for pkvm here.

But all devices share the same VMID, which impacts all devices on the
system, and is not that rare to ignore.

I can add gather support, it’s not that complicated, it is currently
supported in Android.
But that doesn’t solve the problem, which is: At some point, whether
eagerly from the page table code, through gather sync or a fancy
invalidation array, the driver will need to populate a range
invalidation command (tg, ttl, scale...) and this logic is better
shared with the main driver which is this patch does.

Thanks,
Mostafa

> 
> Jason



More information about the linux-arm-kernel mailing list