From: Jason Gunthorpe <jgg@nvidia.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>,
Vijayanand Jitta <vijayanand.jitta@oss.qualcomm.com>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Prakash Gupta <prakash.gupta@oss.qualcomm.com>
Subject: Re: [PATCH] iommu/io-pgtable-arm: Add support for contiguous hint bit
Date: Wed, 15 Jul 2026 15:09:49 -0300 [thread overview]
Message-ID: <20260715180949.GD3775915@nvidia.com> (raw)
In-Reply-To: <d20d258d-d970-4ef1-bbb6-cdc83fc20c9d@arm.com>
On Wed, Jul 15, 2026 at 06:45:09PM +0100, Robin Murphy wrote:
> > AFAICR the biggest issue with arm-smmu was it using IO_PGTABLE_ARMV7S
> > as well. I think it would be fine to implement all the unique LPAE
> > features it needs in iommupt, I did most of them already.
> >
> > I do have an ARMV7S implementation for iommupt, but I did not solve
> > the sub page problem. So while it is functionally working it is not
> > usable since it wastes so much memory. That's a tricky problem to
> > solve since the algorithms depend on the gather->freelist.
> >
> > I didn't spend any time trying to do anything about this as I was not
> > intending to touch arm-smmu
>
> Indeed between the irregular table sizes (before you even get to the
> Mediatek shenanigans...), and the awkward GFP_DMA limitations and/or reality
> that many of the systems using it really don't have memory to waste, I'd
> have considered v7s pretty much terminally incompatible with iommu_pages and
> the abstraction that iommupt is trying to be... :/
At least Matthew has talked about having a sub page allocator with
meta data, maybe with the memdesc support someday. Even today we could
have iommu-pages allocate a companion struct pointed to from struct
page that was sized 4x so it could be used for the freelist.
There are some other options for alterantive algorithms that could
work without requiring the free list. I had some thoughts about placing
the free list inside the data itself as a non-present entry.
It is not insolvable, I'm just not sure it is worth doing vs leaving
arm-smmu to keep using iopgtable from ARMv7.
Otherwise to have arm-smmu use iommupt you'd end up with two
iommu_domains specialized to 32 and 64 bit page tables, with their own
ops and a shared invalidation like how the tlbi struct is providing
for smmuv3.
It is not outrageously bad, but it certainly is a chunk of work.
If the goal is arm-smmu support of CONT then maybe there is some merit
in doing iopgtable as a one off feature. But there have been many
attempts so far to add CONT and they all had troubles, I had the
impression is is not so easy..
Jason
next prev parent reply other threads:[~2026-07-15 18:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 9:02 [PATCH] iommu/io-pgtable-arm: Add support for contiguous hint bit Vijayanand Jitta
2026-06-19 19:40 ` Daniel Mentz
2026-06-25 5:47 ` Vijayanand Jitta
2026-07-03 16:12 ` Jason Gunthorpe
2026-07-07 23:04 ` Daniel Mentz
2026-07-07 23:58 ` Jason Gunthorpe
2026-07-15 5:55 ` Vijayanand Jitta
2026-07-15 11:39 ` Jason Gunthorpe
2026-07-15 12:03 ` Will Deacon
2026-07-15 12:14 ` Robin Murphy
2026-07-15 12:50 ` Jason Gunthorpe
2026-07-15 17:45 ` Robin Murphy
2026-07-15 18:09 ` Jason Gunthorpe [this message]
2026-07-15 12:28 ` 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=20260715180949.GD3775915@nvidia.com \
--to=jgg@nvidia.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prakash.gupta@oss.qualcomm.com \
--cc=robin.murphy@arm.com \
--cc=vijayanand.jitta@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.