From: Robin Murphy <robin.murphy@arm.com>
To: Jason Gunthorpe <jgg@nvidia.com>, Steven Price <steven.price@arm.com>
Cc: 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 14:50:34 +0100 [thread overview]
Message-ID: <d9f64a98-2091-4882-8a2c-115fe24f6f77@arm.com> (raw)
In-Reply-To: <20241021121724.GN3559746@nvidia.com>
On 21/10/2024 1:17 pm, Jason Gunthorpe wrote:
> On Mon, Oct 21, 2024 at 12:32:21PM +0100, Steven Price wrote:
>
>>> that, we can always do it in two steps (unmap the 2M region and remap
>>> the borders). At some point it'd be good to have some kind of atomic
>>> page table updates, so we don't have this short period of time during
>>> which nothing is mapped (between the unmap and the remap), but that's a
>>> different story.
>>
>> The GPU hardware provides that. The only possible missing piece is that
>> the driver needs to know ahead of time that the unmap would unmap the 2M
>> region so it can do the correct lock before the entries are removed.
>
> It looks like we need atomic update for some confidential compute
> scenarios, so I am working toward that with the coming generic pt
> stuff.
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.
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.)
Thanks,
Robin.
next prev parent reply other threads:[~2024-10-21 13:50 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 [this message]
2024-10-21 14:20 ` Jason Gunthorpe
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=d9f64a98-2091-4882-8a2c-115fe24f6f77@arm.com \
--to=robin.murphy@arm.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=liviu.dudau@arm.com \
--cc=patches@lists.linux.dev \
--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