From: Robin Murphy <robin.murphy@arm.com>
To: Jason Gunthorpe <jgg@ziepe.ca>, Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
"Rob Herring (Arm)" <robh@kernel.org>,
Joerg Roedel <jroedel@suse.de>,
Bjorn Helgaas <bhelgaas@google.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
peter.griffin@linaro.org, andre.draszik@linaro.org,
willmcvicker@google.com, jyescas@google.com,
kernel-team@android.com, stable@vger.kernel.org
Subject: Re: [PATCH] iommu: Fix bypass of IOMMU readiness check for multi-IOMMU devices
Date: Thu, 2 Apr 2026 15:20:59 +0100 [thread overview]
Message-ID: <39d07d46-fee3-48a3-a991-b293e9d498db@arm.com> (raw)
In-Reply-To: <20260402115958.GA2551565@ziepe.ca>
On 2026-04-02 12:59 pm, Jason Gunthorpe wrote:
> On Thu, Apr 02, 2026 at 02:25:54PM +0300, Tudor Ambarus wrote:
>
>> I can probably track whether all instances are ready, and defer if any
>> is not ready, but then I'll force the iommu clients to use the sketchy
>> replay path, which seems like a bad idea, according to Robin's feedback.
>
> I didn't think that was sketchy, it is part of the boot ordering
> system to ensure that the iommu driver(s) is probed before the client
> devices.
>
> Half operating a device is definately going to get things into trouble
> with broken/incomplete domain attachments at least.
The Exynos driver itself is actually fine, and doing everything right.
We'll never have a "half-configured" client device in IOMMU API terms
currently - only once both instances are registered such that both
of_xlate calls can succeed (one for each specifier in the client
device's "iommus" property) will we proceed to calling probe_device,
which will then work as normal.
The issue here is purely in the race-avoidance scheme within
of_iommu_configure() itself, which hasn't accounted for the fact that
when it's looping over multiple specifiers, they don't necessarily all
target the same IOMMU node. And it's only during a window where the
instance targeted by the first specifier happens to be registered
already, and the second is currently in the middle of registering.
Thanks,
Robin.
next prev parent reply other threads:[~2026-04-02 14:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 13:09 [PATCH] iommu: Fix bypass of IOMMU readiness check for multi-IOMMU devices Tudor Ambarus
2026-03-23 13:54 ` Jason Gunthorpe
2026-03-23 16:46 ` Tudor Ambarus
2026-03-23 17:31 ` Jason Gunthorpe
2026-04-02 11:25 ` Tudor Ambarus
2026-04-02 11:59 ` Jason Gunthorpe
2026-04-02 14:20 ` Robin Murphy [this message]
2026-03-24 11:40 ` Robin Murphy
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=39d07d46-fee3-48a3-a991-b293e9d498db@arm.com \
--to=robin.murphy@arm.com \
--cc=andre.draszik@linaro.org \
--cc=bhelgaas@google.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=jroedel@suse.de \
--cc=jyescas@google.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=peter.griffin@linaro.org \
--cc=robh@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=will@kernel.org \
--cc=willmcvicker@google.com \
/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