[PATCH v2 10/30] iommu/ipmmu-vmsa: implement iova_to_phys_length
Jason Gunthorpe
jgg at ziepe.ca
Tue Jun 2 18:13:30 PDT 2026
On Tue, Jun 02, 2026 at 06:46:17PM +0800, Guanghui Feng wrote:
> Migrate IPMMU-VMSA to implement iova_to_phys_length, passing through
> mapped_length from io-pgtable.
>
> Signed-off-by: Guanghui Feng <guanghuifeng at linux.alibaba.com>
> ---
> drivers/iommu/ipmmu-vmsa.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
> index 9386b752dea2..a1b659ddbdb5 100644
> --- a/drivers/iommu/ipmmu-vmsa.c
> +++ b/drivers/iommu/ipmmu-vmsa.c
> @@ -699,14 +699,18 @@ static void ipmmu_iotlb_sync(struct iommu_domain *io_domain,
> ipmmu_flush_iotlb_all(io_domain);
> }
>
> -static phys_addr_t ipmmu_iova_to_phys(struct iommu_domain *io_domain,
> - dma_addr_t iova)
> +static phys_addr_t ipmmu_iova_to_phys_length(struct iommu_domain *io_domain,
> + dma_addr_t iova, size_t *mapped_length)
> {
> struct ipmmu_vmsa_domain *domain = to_vmsa_domain(io_domain);
>
> + if (mapped_length)
> + *mapped_length = 0;
Why?
Jason
More information about the linux-arm-kernel
mailing list