From: Jason Gunthorpe <jgg@nvidia.com>
To: 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>
Cc: 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>,
Mostafa Saleh <smostafa@google.com>
Subject: [PATCH v2 0/9] Use the generic iommu page table for SMMUv3
Date: Wed, 12 Aug 2026 17:09:16 -0300 [thread overview]
Message-ID: <0-v2-563ee63886f0+1209-iommupt_armv8_jgg@nvidia.com> (raw)
[ This is the last patch to move SMMUv3 over to the generic page
table:
1) Organize the SMMUv3 invalidation flow so iommupt can use it
..
2) Use the generic iommu page table for SMMUv3
It depends on #1
The whole branch is here:
https://github.com/jgunthorpe/linux/commits/iommu_pt_arm64/
]
Introduce the generic page table for what the ARM spec calls VMSAv8-64
(ie the long 64 bit PTE page table, io-pgtable-arm.c) and use it for
SMMUv3. ARM is by far the most complex page table of all the ones
implemented, it has the most runtime behavior variations and a lot of
features.
Like the othe architectures, the page table itself is supported by a kunit
compare test that runs operations through both io-pgtable-arm.c and the
new code then checks for identical PTEs. This is on the github link above
but I don't intend to merge it.
The existing kunit tests for iommupt will automatically cover the new
format as well.
This is the final series migrating the SMMUv3 driver over to use the new
functions and remove io-pgtable-arm.c usage. In principle the other iommu
drivers that use io-pgtable-arm could be converted someday as well.
Robin once mentioned there were errata about contiguous bits, I only found
3673557 and it is mitigated in this design by always using RIL. I'm
assuming that RIL is always available in SMMUs that are effected by
3673557? I have a patch add a FEAT if for contiguous bits if that is
required.
v3:
- Split the armv8 patch into three parts, generic, db, and iommu
- Clarify some comments, mark some more debug things as WARN_ON
- Use tgsz instead of granule for consistency
- Refactor checks into armv8pt_validate_features() and add more
- Drop PT_FEAT_ARMV8_AARCH32
- Fix make dirty logic
- Use arch/arm64 constants instead of copying for SVA
v2: https://patch.msgid.link/r/0-v1-807e2d1a5efb+e1-iommupt_armv8_jgg@nvidia.com
- Rename granule_lg2sz to tgsz_lg2 to represent the ARM translation granule
v1: https://patch.msgid.link/r/0-v1-807e2d1a5efb+e1-iommupt_armv8_jgg@nvidia.com
Jason Gunthorpe (9):
iommupt: Remove the sanity check for pt_num_items_lg2() at the top
level
iommupt/kunit: Skip test configs without supported features
iommupt/armv8: Add the 64 bit ARMv8 page table format
iommupt/armv8: Add DBM support
iommupt/armv8: Implement the iommu specific components
iommu/arm-smmu-v3: Remove io-pgtable-arm from sva.c
iommu/arm-smmu-v3: Move the DMA API comment to flush_iotlb_all
iommu/arm-smmu-v3: Use the generic iommu page table
iommu: Remove pgsize from iommu_iotlb_gather
drivers/iommu/arm/Kconfig | 4 +-
.../iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 15 +-
.../iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c | 45 +-
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 292 ++---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 11 +-
drivers/iommu/generic_pt/.kunitconfig | 1 +
drivers/iommu/generic_pt/Kconfig | 12 +
drivers/iommu/generic_pt/fmt/Makefile | 2 +
drivers/iommu/generic_pt/fmt/armv8.h | 1072 +++++++++++++++++
drivers/iommu/generic_pt/fmt/defs_armv8.h | 23 +
drivers/iommu/generic_pt/fmt/iommu_armv8.c | 13 +
drivers/iommu/generic_pt/iommu_pt.h | 14 -
drivers/iommu/generic_pt/kunit_iommu.h | 10 +
include/linux/generic_pt/common.h | 38 +
include/linux/generic_pt/iommu.h | 72 ++
include/linux/iommu.h | 62 +-
16 files changed, 1391 insertions(+), 295 deletions(-)
create mode 100644 drivers/iommu/generic_pt/fmt/armv8.h
create mode 100644 drivers/iommu/generic_pt/fmt/defs_armv8.h
create mode 100644 drivers/iommu/generic_pt/fmt/iommu_armv8.c
base-commit: d8129132de326dbcbdbb0abf46580072d6fd9224
--
2.43.0
next reply other threads:[~2026-08-12 20:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 20:09 Jason Gunthorpe [this message]
2026-08-12 20:09 ` [PATCH v2 1/9] iommupt: Remove the sanity check for pt_num_items_lg2() at the top level Jason Gunthorpe
2026-09-28 23:03 ` Pranjal Shrivastava
2026-08-12 20:09 ` [PATCH v2 2/9] iommupt/kunit: Skip test configs without supported features Jason Gunthorpe
2026-09-28 23:16 ` Pranjal Shrivastava
2026-09-29 14:20 ` Jason Gunthorpe
2026-08-12 20:09 ` [PATCH v2 3/9] iommupt/armv8: Add the 64 bit ARMv8 page table format Jason Gunthorpe
2026-08-12 20:09 ` [PATCH v2 4/9] iommupt/armv8: Add DBM support Jason Gunthorpe
2026-08-12 20:09 ` [PATCH v2 5/9] iommupt/armv8: Implement the iommu specific components Jason Gunthorpe
2026-08-12 20:09 ` [PATCH v2 6/9] iommu/arm-smmu-v3: Remove io-pgtable-arm from sva.c Jason Gunthorpe
2026-08-12 20:09 ` [PATCH v2 7/9] iommu/arm-smmu-v3: Move the DMA API comment to flush_iotlb_all Jason Gunthorpe
2026-08-12 20:09 ` [PATCH v2 8/9] iommu/arm-smmu-v3: Use the generic iommu page table Jason Gunthorpe
2026-08-12 20:09 ` [PATCH v2 9/9] iommu: Remove pgsize from iommu_iotlb_gather 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=0-v2-563ee63886f0+1209-iommupt_armv8_jgg@nvidia.com \
--to=jgg@nvidia.com \
--cc=dmatlack@google.com \
--cc=iommu@lists.linux.dev \
--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=smostafa@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