Re: [RFC 2/8] iommu: Add a helper to check if any iommu device is registered
From: Robin Murphy
Date: Thu Dec 04 2025 - 05:53:42 EST
On 2025-12-03 10:36 pm, Jacob Pan wrote:
Hi Jason,
On Wed, 3 Dec 2025 09:11:29 -0400
Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:
On Tue, Dec 02, 2025 at 04:06:35PM -0800, Jacob Pan wrote:I have moved this dummy iommu driver init under iommufd_init(), which
However, as you pointed out there seems to be no standard ordering
for iommu device registration across platforms. e.g. VT-d hooks up
with x86_init, smmuv3 does that in platform driver probe. This
patchset puts dummy driver under early_initcall which is after both
but not a guarantee for all platforms. Any suggestions?
I think we need to do something more like the sefltest does and
manually bind a driver to a device so this init time ordering
shouldn't matter.
aligns well since it runs after all physical IOMMU drivers have
registered. This dummy driver is intended for iommufd after all. But I
don't see a need to bind to a platform device as the selttest does.
There is no "after all physical IOMMU drivers have registered", there is only "after we've given up waiting to see if one might be loaded as a module", but even that may be indefinite depending on build/runtime configuration.
Thanks,
Robin.