Re: [PATCH v5 03/15] iommupt: Add the basic structure of the iommu implementation

Jason Gunthorpe
2025-09-19T15:26:34Z

On Thu, Sep 18, 2025 at 06:58:04AM +0000, Tian, Kevin wrote:

> I don't quite understand the purpose of ignore_mapped here. Could you
> mind elaborating it? the only caller always sets it now...

And I'll move it to the map patch that uses it:

+ struct pt_iommu_collect_args collect = {};

And invert the sense:

/* Fail if any OAs are within the range */
u8 check_mapped : 1;

Its purpose is to micro optimize deinit, we don't need to check every
leaf table to see what is in it during deinit.

When processing map() it is not allowed to overmap something that is
already mapped, so the extra checking is needed.

Thanks,
Jason