From: Jason Gunthorpe <jgg@ziepe.ca>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
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: Mon, 23 Mar 2026 14:31:38 -0300 [thread overview]
Message-ID: <20260323173138.GB8437@ziepe.ca> (raw)
In-Reply-To: <1062b66d-e4d0-4eee-8fc2-dbb65491a01b@linaro.org>
On Mon, Mar 23, 2026 at 06:46:39PM +0200, Tudor Ambarus wrote:
> Downstream we have a display controller that's using:
> iommus = <&sysmmu_19840000>, <&sysmmu_19c40000>;
>
> These are 2 distinct platform devices, they probe independently, they
> each call iommu_device_register() independently.
Sure, I guessed that is what you ment..
Do you have an example of this in an upstream DTS file?
> If I understood you correctly, the downstream driver shall model its
> architecture and call iommu_device_register() only once after both
> devices are configured.
No.. I'm not being so perscriptive, I'm just saying that once
iommu->ops->probe_device() returns then the device is fully setup and
dev->iommu will operate all of the iommus described in iommus=<..>
probe_device() cannot return some half setup device with only some of
the iommu instances working.
We don't have any core idea of a half setup result from
probe_device() today.
> If the core's intent is to strictly enforce a single IOMMU instance,
> shouldn't iommu_fwspec_init() be checking
> fwspec->iommu_fwnode == iommu_fwnode
> instead of matching the ops? Because the core currently matches on
> ops, it permits aggregating multiple physical instances with the
> same ops into one fwspec.
The driver is responsible to handle this, not the core. It has to hide
this mess under its covers, not rely on multiple calls to of_xlate or
however it has been hacked up.
Probably it means something like of_xlate/probe_device has to
EPROBE_DEFER if all the instances listed in iommus don't exist.
Jason
next prev parent reply other threads:[~2026-03-23 17:31 UTC|newest]
Thread overview: 5+ 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 [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=20260323173138.GB8437@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=andre.draszik@linaro.org \
--cc=bhelgaas@google.com \
--cc=iommu@lists.linux.dev \
--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=robin.murphy@arm.com \
--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