From: Mostafa Saleh <smostafa@google.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: iommu@lists.linux.dev, "Joerg Roedel (AMD)" <joro@8bytes.org>,
Jean-Philippe Brucker <jpb@kernel.org>,
linux-arm-kernel@lists.infradead.org,
Robin Murphy <robin.murphy@arm.com>,
Will Deacon <will@kernel.org>,
David Matlack <dmatlack@google.com>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
patches@lists.linux.dev, Pranjal Shrivastava <praan@google.com>,
Samiullah Khawaja <skhawaja@google.com>
Subject: Re: [PATCH 6/7] iommu/arm-smmu-v3: Use the generic iommu page table
Date: Fri, 24 Jul 2026 19:30:39 +0000 [thread overview]
Message-ID: <amO9X2vBl3_jIttb@google.com> (raw)
In-Reply-To: <6-v1-807e2d1a5efb+e1-iommupt_armv8_jgg@nvidia.com>
On Mon, Jul 06, 2026 at 01:29:12PM -0300, Jason Gunthorpe wrote:
> Switch to use the iommupt provided page table. This is fairly
> straightforward now since the page table construction and hwinfo are very
> similar to io-pgtable-arm.
>
> The struct pt_iommu_armv8_hw_info is a direct replacement for 'tcr' and I
> have a kunit compare test validating that the fields have identical values
> for identical configurations.
>
> Quirks are replaced by features
> IO_PGTABLE_QUIRK_ARM_HD -> PT_FEAT_ARMV8_DBM
> IO_PGTABLE_QUIRK_ARM_S2FWB -> PT_FEAT_ARMV8_S2FWB
>
> SMMU features are mapped to iommupt features:
> ARM_SMMU_FEAT_COHERENCY -> PT_FEAT_DMA_INCOHERENT
> ARM_SMMU_FEAT_VAX -> PT_FEAT_ARMV8_LVA
> ARM_SMMU_FEAT_S2FWB -> PT_FEAT_ARMV8_S2FWB
>
> Remove the iommu_flush_ops entirely, iommupt only uses gathers for
> invalidation. Wire the tlbi directly to the gather.
>
> Remove the trampoline for map/unmap/iova/read_and_clear_dirt. iommupt
> directly provides the domain ops. Domain initialization is largely moved
> into iommupt common code.
>
> Change the kunit to fully create a page table to generate the tcr bits for
> testing.
>
> Compared to io-pgtable-arm iommupt has a number of key differences:
> - CONT support, including always using RIL to avoid errata 3673557
> - Unmap yields a single gather which generates a single tlbi operation
> * free_list is always used to free after invalidate
> * walk cache and leaf invalidation are combined for non-RIL cases
> instead of being duplicated
> * non-RIL cut over to all-invalidate covers walk invalidation now too,
> umap -> single gather -> single all invalidate.
> * RIL flushes the walk cache and leafs together with a good TTL hint.
> * RIL always generates one command from any gather.
>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
> drivers/iommu/arm/Kconfig | 4 +-
> .../iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c | 45 +--
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 256 ++++++------------
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 11 +-
> 4 files changed, 110 insertions(+), 206 deletions(-)
>
[...]
> -
> static bool arm_smmu_dbm_capable(struct arm_smmu_device *smmu)
> {
> u32 features = (ARM_SMMU_FEAT_HD | ARM_SMMU_FEAT_COHERENCY);
> @@ -2831,7 +2785,6 @@ static bool arm_smmu_capable(struct device *dev, enum iommu_cap cap)
> case IOMMU_CAP_ENFORCE_CACHE_COHERENCY:
> return arm_smmu_master_canwbs(master);
> case IOMMU_CAP_NOEXEC:
> - case IOMMU_CAP_DEFERRED_FLUSH:
Why this is removed? That would drop support for FQ domains.
Thanks,
Mostafa
> return true;
> case IOMMU_CAP_DIRTY_TRACKING:
> return arm_smmu_dbm_capable(master->smmu);
next prev parent reply other threads:[~2026-07-24 19:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 16:29 [PATCH 0/7] Use the generic iommu page table for SMMUv3 Jason Gunthorpe
2026-07-06 16:29 ` [PATCH 1/7] iommupt: Remove the sanity check for pt_num_items_lg2() at the top level Jason Gunthorpe
2026-07-24 17:49 ` Mostafa Saleh
2026-07-06 16:29 ` [PATCH 2/7] iommupt/kunit: Skip test configs without supported features Jason Gunthorpe
2026-07-06 16:29 ` [PATCH 3/7] iommupt: Add the 64 bit ARMv8 page table format Jason Gunthorpe
2026-07-24 19:24 ` Mostafa Saleh
2026-07-25 1:12 ` Jason Gunthorpe
2026-07-06 16:29 ` [PATCH 4/7] iommu/arm-smmu-v3: Remove io-pgtable-arm from sva.c Jason Gunthorpe
2026-07-24 19:26 ` Mostafa Saleh
2026-07-06 16:29 ` [PATCH 5/7] iommu/arm-smmu-v3: Move the DMA API comment to flush_iotlb_all Jason Gunthorpe
2026-07-24 19:26 ` Mostafa Saleh
2026-07-06 16:29 ` [PATCH 6/7] iommu/arm-smmu-v3: Use the generic iommu page table Jason Gunthorpe
2026-07-24 19:30 ` Mostafa Saleh [this message]
2026-07-25 0:31 ` Jason Gunthorpe
2026-07-06 16:29 ` [PATCH 7/7] iommu: Remove pgsize from iommu_iotlb_gather Jason Gunthorpe
2026-07-24 19:36 ` [PATCH 0/7] Use the generic iommu page table for SMMUv3 Mostafa Saleh
2026-07-25 0:42 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=amO9X2vBl3_jIttb@google.com \
--to=smostafa@google.com \
--cc=dmatlack@google.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=jpb@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=pasha.tatashin@soleen.com \
--cc=patches@lists.linux.dev \
--cc=praan@google.com \
--cc=robin.murphy@arm.com \
--cc=skhawaja@google.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox