Re: [PATCH v3 10/19] iommufd: Add IOMMU_HWPT_GET_DIRTY_IOVA

Jason Gunthorpe
2023-10-13T17:03:38Z

On Fri, Oct 13, 2023 at 05:58:43PM +0100, Joao Martins wrote:
> > I can sort of see restricting the start/stop iova

> There's no fundamental reason to restricting it; I am probably just too obsessed
> with making the most granular tracking, but I shouldn't restrict the user to
> track at some other page granularity

I would not restrict it, it makes the ABI less compatbile if you restrict
it.

> > I see you are passing it around the internal API, but that could
> > easily pass the whole command too
>
> I use it for the read_and_clear_dirty_data (and it's input validation). Kinda
> weird to do:
>
> iommu_read_and_clear(domain, flags, cmd)
>
> Considering none of those functions pass command data around. If you prefer with
> passing the whole command then I can go at it;

Compared to adding some weirdness to the uapi header, I would prefer
weirdness in the internal code

Jason