Re: [PATCH v5 1/4] iommu_pt: Fix pgsize_bitmap calculation in get_info for smaller vasz's

From: Jason Gunthorpe

Date: Mon Apr 13 2026 - 12:24:31 EST


On Mon, Apr 13, 2026 at 02:45:18PM +0000, Ankit Soni wrote:
> To properly enforce the domain VA limit, clamp pgsize_bitmap using the
> requested max_vasz_lg2 in get_info().
> Apply the same VA limit as get_info() in the kunit possible_sizes test so
> assertions stay consistent with the domain bitmap.
>
> Suggested-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Signed-off-by: Ankit Soni <Ankit.Soni@xxxxxxx>
> ---
> drivers/iommu/generic_pt/iommu_pt.h | 8 ++++++--
> drivers/iommu/generic_pt/kunit_generic_pt.h | 10 +++++++---
> 2 files changed, 13 insertions(+), 5 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason