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

Tian, Kevin
2025-09-24T09:22:15Z

> From: Jason Gunthorpe <jgg@nvidia.com>
> Sent: Friday, September 19, 2025 11:26 PM
>
> 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.
>

Okay, it's clear then.