mbox series

[v3,0/4] iommu/smmuv3: Add IOMMUFD dirty tracking support for SMMUv3

Message ID 20240430134308.1604-1-shameerali.kolothum.thodi@huawei.com (mailing list archive)
Headers show
Series iommu/smmuv3: Add IOMMUFD dirty tracking support for SMMUv3 | expand

Message

Shameer Kolothum April 30, 2024, 1:43 p.m. UTC
Hi

v2 --> v3

 -Rebased on top of the latest of Jason's refactor series git[3].
 -Addressed comments from Ryan and Jason(patch 2 & 3, Thanks!)
 -Added R-by tags  to 1 & 4.

Please take a look and let me know your feedback.
Thanks,
Shameer

---
This is revisiting the earlier attempts [1, 2] to use SMMUv3 HTTU feature
for dirty page tracking. The Intel/AMD support is already mainline.

Basic sanity tests are done using an emulation setup and on a test
hardware setup. Block page split/merge(BBML) is not part of this
series. I am planning to send it separately.

v1 --> v2:
https://lore.kernel.org/linux-iommu/20231128094940.1344-1-shameerali.kolothum.thodi@huawei.com/

Addressed review comments from Jason and Joao(Thanks)
   -Moved dirty_ops setting to domain finalise(patch #3)
   -Only enable DBM for stage 1 if domain_alloc_user() requests it.
   -Changed IO page table walker(patch #2) and tested with 4KB/16KB/64KB
    with l1/l2/l3 traversal.(The earlier one had a bug where it fails to
    walk L3 level).
   -Rearranged patches a bit to improve bi-sectability.
   -Rebased on top of Jason's v5 of SMMUv3 new API series git.

1. https://lore.kernel.org/lkml/20210413085457.25400-1-zhukeqian1@huawei.com/
2. https://lore.kernel.org/linux-iommu/20230518204650.14541-1-joao.m.martins@oracle.com/
3. https://github.com/jgunthorpe/linux/commits/smmuv3_newapi

Jean-Philippe Brucker (1):
  iommu/arm-smmu-v3: Add feature detection for HTTU

Joao Martins (1):
  iommu/arm-smmu-v3: Add support for dirty tracking in domain alloc

Kunkun Jiang (1):
  iommu/arm-smmu-v3: Enable HTTU for stage1 with io-pgtable mapping

Shameer Kolothum (1):
  iommu/io-pgtable-arm: Add read_and_clear_dirty() support

 drivers/iommu/Kconfig                       |   1 +
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 129 ++++++++++++++++----
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h |   8 ++
 drivers/iommu/io-pgtable-arm.c              | 110 ++++++++++++++++-
 include/linux/io-pgtable.h                  |   4 +
 5 files changed, 226 insertions(+), 26 deletions(-)

Comments

Jason Gunthorpe May 12, 2024, 12:58 p.m. UTC | #1
On Tue, Apr 30, 2024 at 02:43:04PM +0100, Shameer Kolothum wrote:
> This is revisiting the earlier attempts [1, 2] to use SMMUv3 HTTU feature
> for dirty page tracking. The Intel/AMD support is already mainline.
> 
> Basic sanity tests are done using an emulation setup and on a test
> hardware setup. Block page split/merge(BBML) is not part of this
> series. I am planning to send it separately.

This looks good to me, lets have it go after the merge window. As I
mentioned please post a version rebased on top of v6.10-rc1. (ie
based on the patches only in Joerg's current tree) in two weeks.

Thanks,
Jason
Shameer Kolothum May 22, 2024, 1:28 p.m. UTC | #2
> -----Original Message-----
> From: Jason Gunthorpe <jgg@nvidia.com>
> Sent: Sunday, May 12, 2024 1:59 PM
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Cc: iommu@lists.linux.dev; linux-arm-kernel@lists.infradead.org;
> robin.murphy@arm.com; will@kernel.org; joro@8bytes.org;
> ryan.roberts@arm.com; kevin.tian@intel.com; nicolinc@nvidia.com;
> mshavit@google.com; eric.auger@redhat.com; joao.m.martins@oracle.com;
> jiangkunkun <jiangkunkun@huawei.com>; zhukeqian
> <zhukeqian1@huawei.com>; Linuxarm <linuxarm@huawei.com>
> Subject: Re: [PATCH v3 0/4] iommu/smmuv3: Add IOMMUFD dirty tracking
> support for SMMUv3
> 
> On Tue, Apr 30, 2024 at 02:43:04PM +0100, Shameer Kolothum wrote:
> > This is revisiting the earlier attempts [1, 2] to use SMMUv3 HTTU feature
> > for dirty page tracking. The Intel/AMD support is already mainline.
> >
> > Basic sanity tests are done using an emulation setup and on a test
> > hardware setup. Block page split/merge(BBML) is not part of this
> > series. I am planning to send it separately.
> 
> This looks good to me, lets have it go after the merge window. As I
> mentioned please post a version rebased on top of v6.10-rc1. (ie
> based on the patches only in Joerg's current tree) in two weeks.

Ok. I will cherry pick the ones required to make this independent and
post it soon after addressing all the pending comments.

Thanks,
Shameer