[PATCH v6 06/25] iommu/io-pgtable-arm: Rework to use the iommu-pages API

Mostafa Saleh smostafa at google.com
Wed May 13 14:54:46 PDT 2026


On Mon, May 11, 2026 at 11:18:49AM -0300, Jason Gunthorpe wrote:
> On Mon, May 11, 2026 at 11:16:47AM +0000, Mostafa Saleh wrote:
> > > IDK, why? virt_to_phys() is part of the iommu-pages API, I'd just
> > > leave it.. If you want to narrow it then #define it for pkvm when
> > > compiling this file..
> > 
> > It is not going to be part of the iommu-pages API, I meant in
> > io-pgtable-arm, we will use something arm_lpae_virt_to_phys()...
> > which is then implemented differently for pkvm.
> 
> Again why? I think the main goal should be to not mess up the normal
> code. 
> 
>   #define virt_to_phys pkvm_virt_to_phys
> 
> Does that, we should be leaning into this pattern I think, not adding
> unnecessary churn...
> 
> If anything is needed then it should be an iommu_pages function to
> wrapper virt_to_phys() for use by iommu_pages uses but I'd rather
> not..
> 

Sure, no strong opinion, I did post this patch along with cleanups
separately in:
https://lore.kernel.org/linux-iommu/20260513215203.3852661-1-smostafa@google.com/

Thanks,
Mostafa


> Jason



More information about the linux-arm-kernel mailing list