RE: [PATCH v5 08/15] iommupt: Add read_and_clear_dirty op

Tian, Kevin
2025-09-26T07:48:53Z

> From: Jason Gunthorpe <jgg@nvidia.com>
> Sent: Thursday, September 4, 2025 1:47 AM
>
> IOMMU HW now supports updating a dirty bit in an entry when a DMA
> writes
> to the entry's VA range. iommufd has a uAPI to read and clear the dirty
> bits from the tables.
>
> This is a trivial recursive descent algorithm to read and optionally clear
> the dirty bits. The format needs a function to tell if a contiguous entry
> is dirty, and a function to clear a contiguous entry back to clean.
>
> Tested-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Reviewed-by: Kevin Tian <kevin.tian@intel.com>