]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu_pt: Fix pgsize_bitmap calculation in get_info for smaller vasz's
authorAnkit Soni <Ankit.Soni@amd.com>
Mon, 13 Apr 2026 14:45:18 +0000 (14:45 +0000)
committerJoerg Roedel <joerg.roedel@amd.com>
Tue, 19 May 2026 08:49:02 +0000 (10:49 +0200)
commit04f1f4bf30b8b00e9eca7143dea094ccc2ec478e
tree82e6b0a21b297d9d977a89d71772a361a60990b7
parent5d6919055dec134de3c40167a490f33c74c12581
iommu_pt: Fix pgsize_bitmap calculation in get_info for smaller vasz's

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@nvidia.com>
Signed-off-by: Ankit Soni <Ankit.Soni@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/generic_pt/iommu_pt.h
drivers/iommu/generic_pt/kunit_generic_pt.h