Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-05-05 Thread Joao Martins
in >> Murphy ; Jean-Philippe Brucker >> ; zhukeqian ; >> Shameerali Kolothum Thodi ; >> David Woodhouse ; Lu Baolu >> ; Jason Gunthorpe ; Nicolin Chen >> ; Yishai Hadas ; Eric Auger >> ; Liu, Yi L ; Alex Williamson >> ; Cornelia Huck ; >> k...@vger.kernel

RE: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-05-05 Thread Shameerali Kolothum Thodi via iommu
m Thodi ; > David Woodhouse ; Lu Baolu > ; Jason Gunthorpe ; Nicolin Chen > ; Yishai Hadas ; Eric Auger > ; Liu, Yi L ; Alex Williamson > ; Cornelia Huck ; > k...@vger.kernel.org; iommu@lists.linux-foundation.org > Subject: Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add > set_d

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-05-02 Thread Joao Martins
[my mua made the message a tad crooked with the quotations] On 5/2/22 12:52, Joao Martins wrote: > On 4/29/22 20:20, Robin Murphy wrote: >> On 2022-04-29 17:40, Joao Martins wrote: >>> On 4/29/22 17:11, Jason Gunthorpe wrote: On Fri, Apr 29, 2022 at 03:45:23PM +0100, Joao Martins wrote:

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-05-02 Thread Joao Martins
On 4/29/22 20:20, Robin Murphy wrote: > On 2022-04-29 17:40, Joao Martins wrote: >> On 4/29/22 17:11, Jason Gunthorpe wrote: >>> On Fri, Apr 29, 2022 at 03:45:23PM +0100, Joao Martins wrote: On 4/29/22 13:23, Jason Gunthorpe wrote: > On Fri, Apr 29, 2022 at 01:06:06PM +0100, Joao Martins

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-04-29 Thread Robin Murphy
On 2022-04-29 17:40, Joao Martins wrote: On 4/29/22 17:11, Jason Gunthorpe wrote: On Fri, Apr 29, 2022 at 03:45:23PM +0100, Joao Martins wrote: On 4/29/22 13:23, Jason Gunthorpe wrote: On Fri, Apr 29, 2022 at 01:06:06PM +0100, Joao Martins wrote: TBH I'd be inclined to just enable DBM

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-04-29 Thread Jason Gunthorpe via iommu
On Fri, Apr 29, 2022 at 05:40:56PM +0100, Joao Martins wrote: > > A common use model might be to just destroy the iommu_domain without > > doing stop so prefering the clearing io page table at stop might be a > > better overall design. > > If we want to ensure that the IOPTE dirty state is

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-04-29 Thread Joao Martins
On 4/29/22 17:11, Jason Gunthorpe wrote: > On Fri, Apr 29, 2022 at 03:45:23PM +0100, Joao Martins wrote: >> On 4/29/22 13:23, Jason Gunthorpe wrote: >>> On Fri, Apr 29, 2022 at 01:06:06PM +0100, Joao Martins wrote: >>> > TBH I'd be inclined to just enable DBM unconditionally in >

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-04-29 Thread Jason Gunthorpe via iommu
On Fri, Apr 29, 2022 at 03:45:23PM +0100, Joao Martins wrote: > On 4/29/22 13:23, Jason Gunthorpe wrote: > > On Fri, Apr 29, 2022 at 01:06:06PM +0100, Joao Martins wrote: > > > >>> TBH I'd be inclined to just enable DBM unconditionally in > >>> arm_smmu_domain_finalise() if the SMMU supports it.

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-04-29 Thread Joao Martins
On 4/29/22 13:23, Jason Gunthorpe wrote: > On Fri, Apr 29, 2022 at 01:06:06PM +0100, Joao Martins wrote: > >>> TBH I'd be inclined to just enable DBM unconditionally in >>> arm_smmu_domain_finalise() if the SMMU supports it. Trying to toggle it >>> dynamically (especially on a live domain)

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-04-29 Thread Jason Gunthorpe via iommu
On Fri, Apr 29, 2022 at 01:06:06PM +0100, Joao Martins wrote: > > TBH I'd be inclined to just enable DBM unconditionally in > > arm_smmu_domain_finalise() if the SMMU supports it. Trying to toggle it > > dynamically (especially on a live domain) seems more trouble that it's > > worth. > >

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-04-29 Thread Joao Martins
On 4/29/22 12:19, Robin Murphy wrote: > On 2022-04-29 12:05, Joao Martins wrote: >> On 4/29/22 09:28, Tian, Kevin wrote: From: Joao Martins Sent: Friday, April 29, 2022 5:09 AM Similar to .read_and_clear_dirty() use the page table walker helper functions and set

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-04-29 Thread Robin Murphy
On 2022-04-29 12:05, Joao Martins wrote: On 4/29/22 09:28, Tian, Kevin wrote: From: Joao Martins Sent: Friday, April 29, 2022 5:09 AM Similar to .read_and_clear_dirty() use the page table walker helper functions and set DBM|RDONLY bit, thus switching the IOPTE to writeable-clean. this

Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-04-29 Thread Joao Martins
On 4/29/22 09:28, Tian, Kevin wrote: >> From: Joao Martins >> Sent: Friday, April 29, 2022 5:09 AM >> >> Similar to .read_and_clear_dirty() use the page table >> walker helper functions and set DBM|RDONLY bit, thus >> switching the IOPTE to writeable-clean. > > this should not be one-off if the

RE: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support

2022-04-29 Thread Tian, Kevin
> From: Joao Martins > Sent: Friday, April 29, 2022 5:09 AM > > Similar to .read_and_clear_dirty() use the page table > walker helper functions and set DBM|RDONLY bit, thus > switching the IOPTE to writeable-clean. this should not be one-off if the operation needs to be applied to IOPTE. Say a