From: Jason Gunthorpe <jgg@nvidia.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Steven Price <steven.price@arm.com>,
Boris Brezillon <boris.brezillon@collabora.com>,
iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
linux-arm-kernel@lists.infradead.org,
Will Deacon <will@kernel.org>,
dri-devel@lists.freedesktop.org,
Liviu Dudau <liviu.dudau@arm.com>,
patches@lists.linux.dev
Subject: Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior
Date: Mon, 21 Oct 2024 11:20:03 -0300 [thread overview]
Message-ID: <20241021142003.GS3559746@nvidia.com> (raw)
In-Reply-To: <d9f64a98-2091-4882-8a2c-115fe24f6f77@arm.com>
On Mon, Oct 21, 2024 at 02:50:34PM +0100, Robin Murphy wrote:
> Beware that whatever the Mali drivers might have the option to do for
> themselves, there's still no notion of "atomic update" for SMMU and
> io-pgtable-arm in general, other than perhaps for permission changes - even
> BBML is quite explicitly non-atomic, as it's defined in terms of two
> otherwise-identical mappings existing at the same time, just guaranteeing
> that while they do, you'll still get behaviour consistent with one *or* the
> other, and not anything in-between.
one or the other is mostly what atomic means in this context. CC just
doesn't want any sort of fault.
> As far as this patch goes, though, I would not be at all unhappy to see the
> back of split_blk_unmap... However if we are going to do this then I'd like
> even more to formally define it as the behaviour of iommu_unmap() and fix up
> all the other drivers which behave still differently (the statement in the
> commit message is incorrect - io-pgtable-arm-v7s still splits; at least
> exynos fails the unmap entirely.)
Hmm, my kunit does cover io-pgtable-arm-v7 but I see there is a
mistake. I can remove it and test it there too.
Exynos looks like it triggers WARN_ONs so nobody uses it there at least:
if (lv1ent_section(ent)) {
if (WARN_ON(size < SECT_SIZE)) {
err_pgsize = SECT_SIZE;
goto err;
}
We just need to delete that WARN block?
I'm not sure what to document here, I don't think we should tell
people to rely on this given we can't test every single
implementation. I'm mostly interested to ensure that nobody has
quietly started relying on split behavior.
Jason
next prev parent reply other threads:[~2024-10-21 14:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 17:19 [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior Jason Gunthorpe
2024-10-21 9:17 ` Boris Brezillon
2024-10-21 11:32 ` Steven Price
2024-10-21 12:17 ` Jason Gunthorpe
2024-10-21 13:50 ` Robin Murphy
2024-10-21 14:20 ` Jason Gunthorpe [this message]
2024-10-24 13:05 ` Will Deacon
2024-10-24 13:44 ` Jason Gunthorpe
2024-11-01 11:54 ` Will Deacon
2024-11-01 11:58 ` Will Deacon
2024-11-01 15:37 ` Jason Gunthorpe
2024-11-01 13:40 ` Jason Gunthorpe
2024-11-04 11:32 ` Will Deacon
2025-07-05 20:12 ` Daniel Mentz
2025-07-07 16:05 ` Liviu Dudau
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=20241021142003.GS3559746@nvidia.com \
--to=jgg@nvidia.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=liviu.dudau@arm.com \
--cc=patches@lists.linux.dev \
--cc=robin.murphy@arm.com \
--cc=steven.price@arm.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;
as well as URLs for NNTP newsgroup(s).