Re: [PATCH v5 04/27] iommu/io-pgtable-arm: Factor kernel specific code out
From: Jason Gunthorpe
Date: Fri Nov 28 2025 - 11:45:43 EST
On Mon, Nov 17, 2025 at 06:47:51PM +0000, Mostafa Saleh wrote:
> Some of the used APIs are only part of the kernel and are not
> available in the hypervisor, factor those out:
> - alloc/free memory
Why not provide the iommu-pages API for the hypervisor environment?
Same for virt_to_phys, that could be moved into an iommu-pages wrapper
too..
I want to change other parts of the driver to use iommu-pages in the
long run as well, so putting the abstraction there is probably more
valuable than this.
Also the genericpt stuff is merged, should you (eventually?) be making
a pKVM hypervisor specific set of page table functions? Eg if all you
are doing is mirroring the host stage 2 I think you can build
something much more efficient...
Jason