Re: [PATCH RFC 03/19] iommufd: Dirty tracking data support

2022-05-02 Thread Joao Martins
On 4/30/22 05:11, Baolu Lu wrote: > On 2022/4/29 05:09, Joao Martins wrote: >> Add an IO pagetable API iopt_read_and_clear_dirty_data() that >> performs the reading of dirty IOPTEs for a given IOVA range and >> then copying back to userspace from each area-internal bitmap. >> >> Underneath it uses

Re: [PATCH RFC 03/19] iommufd: Dirty tracking data support

2022-04-29 Thread Baolu Lu
On 2022/4/29 05:09, Joao Martins wrote: Add an IO pagetable API iopt_read_and_clear_dirty_data() that performs the reading of dirty IOPTEs for a given IOVA range and then copying back to userspace from each area-internal bitmap. Underneath it uses the IOMMU equivalent API which will read the dir

Re: [PATCH RFC 03/19] iommufd: Dirty tracking data support

2022-04-29 Thread Joao Martins
On 4/29/22 13:09, Jason Gunthorpe wrote: > On Fri, Apr 29, 2022 at 11:54:16AM +0100, Joao Martins wrote: >> On 4/29/22 09:12, Tian, Kevin wrote: From: Joao Martins Sent: Friday, April 29, 2022 5:09 AM >>> [...] + +static int iommu_read_and_clear_dirty(struct iommu_domain *domai

Re: [PATCH RFC 03/19] iommufd: Dirty tracking data support

2022-04-29 Thread Jason Gunthorpe via iommu
On Fri, Apr 29, 2022 at 11:54:16AM +0100, Joao Martins wrote: > On 4/29/22 09:12, Tian, Kevin wrote: > >> From: Joao Martins > >> Sent: Friday, April 29, 2022 5:09 AM > > [...] > >> + > >> +static int iommu_read_and_clear_dirty(struct iommu_domain *domain, > >> +str

Re: [PATCH RFC 03/19] iommufd: Dirty tracking data support

2022-04-29 Thread Joao Martins
On 4/29/22 09:12, Tian, Kevin wrote: >> From: Joao Martins >> Sent: Friday, April 29, 2022 5:09 AM > [...] >> + >> +static int iommu_read_and_clear_dirty(struct iommu_domain *domain, >> + struct iommufd_dirty_data *bitmap) > > In a glance this function and all pre

RE: [PATCH RFC 03/19] iommufd: Dirty tracking data support

2022-04-29 Thread Tian, Kevin
> From: Joao Martins > Sent: Friday, April 29, 2022 5:09 AM [...] > + > +static int iommu_read_and_clear_dirty(struct iommu_domain *domain, > + struct iommufd_dirty_data *bitmap) In a glance this function and all previous helpers doesn't rely on any iommufd objec

[PATCH RFC 03/19] iommufd: Dirty tracking data support

2022-04-28 Thread Joao Martins
Add an IO pagetable API iopt_read_and_clear_dirty_data() that performs the reading of dirty IOPTEs for a given IOVA range and then copying back to userspace from each area-internal bitmap. Underneath it uses the IOMMU equivalent API which will read the dirty bits, as well as atomically clearing th