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

From: Jason Gunthorpe

Date: Mon May 11 2026 - 10:20:07 EST


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..

Jason