Skip to content

sync: rvck #144: 【bugfix】修复iommu的几个严重bug #169

Merged
xmzzz merged 28 commits into
OLK-6.6from
sync/rvck-pr-144
Apr 8, 2026
Merged

sync: rvck #144: 【bugfix】修复iommu的几个严重bug #169
xmzzz merged 28 commits into
OLK-6.6from
sync/rvck-pr-144

Conversation

@xmzzz
Copy link
Copy Markdown
Contributor

@xmzzz xmzzz commented Apr 8, 2026

Sync commits from rvck PR #144.

Source PR: RVCK-Project/rvck#144

Commits

  • 8d7b2ae4098b iommu: Resolve fwspec ops automatically
  • 946b038ebb7a ACPI: Retire acpi_iommu_fwspec_ops()
  • c4c96afaf0bd OF: Simplify of_iommu_configure()
  • 35cd277d7cec iommu: Remove iommu_fwspec ops
  • 02a10a77f6ec iommu: Unexport iommu_fwspec_free()
  • ab641553d357 iommu: Handle race with default domain setup
  • c3b277569467 iommu: Resolve ops in iommu_init_device()
  • 6d26b77c9b51 iommu: Keep dev->iommu state consistent
  • 6b8bab39a56c iommu: Get DT/ACPI parsing into the proper probe path
  • 0ebdfa62ecb2 iommu: Add iommu_paging_domain_alloc() interface
  • 8c96c08689dd iommufd: Use iommu_paging_domain_alloc()
  • 7212794d62f6 vfio/type1: Use iommu_paging_domain_alloc()
  • f948dea76167 vhost-vdpa: Use iommu_paging_domain_alloc()
  • fda43234f33d drm/msm: Use iommu_paging_domain_alloc()
  • 58804d73a30b wifi: ath10k: Use iommu_paging_domain_alloc()
  • 703579c1bf2f wifi: ath11k: Use iommu_paging_domain_alloc()
  • 99d05ff27ea3 drm/nouveau/tegra: Use iommu_paging_domain_alloc()
  • d7a109517378 gpu: host1x: Use iommu_paging_domain_alloc()
  • 8c5ca9a4120b media: nvidia: tegra: Use iommu_paging_domain_alloc()
  • 3b53f537a105 media: venus: firmware: Use iommu_paging_domain_alloc()
  • 8cfafab2a5c9 remoteproc: Use iommu_paging_domain_alloc()
  • 0893d133e6fd soc: fsl: qbman: Use iommu_paging_domain_alloc()
  • 656d5ba49996 RDMA/usnic: Use iommu_paging_domain_alloc()
  • d549cc1c282d drm/rockchip: Use iommu_paging_domain_alloc()
  • 810d25eca8a3 drm/tegra: Use iommu_paging_domain_alloc()
  • ab229768f094 iommu: Remove iommu_present()
  • 2571c3069f5d iommu: Remove iommu_domain_alloc()
  • bdeb506c5462 iommu: Don't warn prematurely about dodgy probes

rmurphy-arm and others added 28 commits April 8, 2026 15:01
mainline inclusion
from mainline-v6.10-rc7
commit 3f7c320916282c26812d70cfe8830abb9e4dc696
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

There's no real need for callers to resolve ops from a fwnode in order
to then pass both to iommu_fwspec_init() - it's simpler and more sensible
for that to resolve the ops itself. This in turn means we can centralise
the notion of checking for a present driver, and enforce that fwspecs
aren't allocated unless and until we know they will be usable.
Also use this opportunity to modernise with some "new" helpers that
arrived shortly after this code was first written; the generic
fwnode_handle_get() clears up that ugly get/put mismatch, while
of_fwnode_handle() can now abstract those open-coded dereferences.
Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 8d7b2ae)
mainline inclusion
from mainline-v6.10-rc7
commit 78596b5c321c9d74eeef1ad51c964563a4081f79
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

Now that iommu_fwspec_init() can signal for probe deferral directly,
acpi_iommu_fwspec_ops() is unneeded and can be cleaned up.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 946b038)
mainline inclusion
from mainline-v6.10-rc7
commit 5f937bc48a6aa63970648c54fb40ea8f96b633dc
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

We no longer have a notion of partially-initialised fwspecs existing,
and we also no longer need to use an iommu_ops pointer to return status
to of_dma_configure(). Clean up the remains of those, which lends itself
to clarifying the logic around the dma_range_map allocation as well.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit c4c96af)
mainline inclusion
from mainline-v6.10-rc7
commit 3e36c15fc1cce65cccc93ed16f86d8ff9d2f9992
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

The ops in iommu_fwspec are only needed for the early configuration and
probe process, and by now are easy enough to derive on-demand in those
couple of places which need them, so remove the redundant stored copy.
Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 35cd277)
mainline inclusion
from mainline-v6.14-rc7
commit 29c6e1c2b923b43e8082bba5c6675185a8fe305a
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

The drivers doing their own fwspec parsing have no need to call
iommu_fwspec_free() since fwspecs were moved into dev_iommu, as
returning an error from .probe_device will tear down the whole lot
anyway. Move it into the private interface now that it only serves
for of_iommu to clean up in an error case.
I have no idea what mtk_v1 was doing in effectively guaranteeing
a NULL fwspec would be dereferenced if no "iommus" DT property was
found, so add a check for that to at least make the code look sane.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 02a10a7)
mainline inclusion
from mainline-v6.14-rc7
commit b46064a18810bad3aea089a79993ca5ea7a3d2b2
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

It turns out that deferred default domain creation leaves a subtle
race window during iommu_device_register() wherein a client driver may
asynchronously probe in parallel and get as far as performing DMA API
operations with dma-direct, only to be switched to iommu-dma underfoot
once the default domain attachment finally happens, with obviously
disastrous consequences. Even the wonky of_iommu_configure() path is at
risk, since iommu_fwspec_init() will no longer defer client probe as the
instance ops are (necessarily) already registered, and the "replay"
iommu_probe_device() call can see dev->iommu_group already set and so
think there's nothing to do either.
Fortunately we already have the right tool in the right place in the
form of iommu_device_use_default_domain(), which just needs to ensure
that said default domain is actually ready to *be* used. Deferring the
client probe shouldn't have too much impact, given that this only
happens while the IOMMU driver is probing, and thus due to kick the
deferred probe list again once it finishes.
Reported-by: Charan Teja Kalla <quic_charante@quicinc.com>
Fixes: 98ac73f99bc4 ("iommu: Require a default_domain for all iommu drivers")

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit ab64155)
mainline inclusion
from mainline-v6.14-rc7
commit fd598f71b66975c042f40ae7cd4310d6e699e149
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

Since iommu_init_device() was factored out, it is in fact the only
consumer of the ops which __iommu_probe_device() is resolving, so let it
do that itself rather than passing them in. This also puts the ops
lookup at a more logical point relative to the rest of the flow through
__iommu_probe_device().

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit c3b2775)
mainline inclusion
from mainline-v6.14-rc7
commit 3832862eb9c4dfa0e80b2522bfaedbc8a43de97d
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

At the moment, if of_iommu_configure() allocates dev->iommu itself via
iommu_fwspec_init(), then suffers a DT parsing failure, it cleans up the
fwspec but leaves the empty dev_iommu hanging around. So far this is
benign (if a tiny bit wasteful), but we'd like to be able to reason
about dev->iommu having a consistent and unambiguous lifecycle. Thus
make sure that the of_iommu cleanup undoes precisely whatever it did.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 6d26b77)
mainline inclusion
from mainline-v6.14-rc7
commit bcb81ac6ae3c2ef95b44e7b54c3c9522364a245c
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

In hindsight, there were some crucial subtleties overlooked when moving
{of,acpi}_dma_configure() to driver probe time to allow waiting for
IOMMU drivers with -EPROBE_DEFER, and these have become an
ever-increasing source of problems. The IOMMU API has some fundamental
assumptions that iommu_probe_device() is called for every device added
to the system, in the order in which they are added. Calling it in a
random order or not at all dependent on driver binding leads to
malformed groups, a potential lack of isolation for devices with no
driver, and all manner of unexpected concurrency and race conditions.
We've attempted to mitigate the latter with point-fix bodges like
iommu_probe_device_lock, but it's a losing battle and the time has come
to bite the bullet and address the true source of the problem instead.
The crux of the matter is that the firmware parsing actually serves two
distinct purposes; one is identifying the IOMMU instance associated with
a device so we can check its availability, the second is actually
telling that instance about the relevant firmware-provided data for the
device. However the latter also depends on the former, and at the time
there was no good place to defer and retry that separately from the
availability check we also wanted for client driver probe.
Nowadays, though, we have a proper notion of multiple IOMMU instances in
the core API itself, and each one gets a chance to probe its own devices
upon registration, so we can finally make that work as intended for
DT/IORT/VIOT platforms too. All we need is for iommu_probe_device() to
be able to run the iommu_fwspec machinery currently buried deep in the
wrong end of {of,acpi}_dma_configure(). Luckily it turns out to be
surprisingly straightforward to bootstrap this transformation by pretty
much just calling the same path twice. At client driver probe time,
dev->driver is obviously set; conversely at device_add(), or a
subsequent bus_iommu_probe(), any device waiting for an IOMMU really
should *not* have a driver already, so we can use that as a condition to
disambiguate the two cases, and avoid recursing back into the IOMMU core
at the wrong times.
Obviously this isn't the nicest thing, but for now it gives us a
functional baseline to then unpick the layers in between without many
more awkward cross-subsystem patches. There are some minor side-effects
like dma_range_map potentially being created earlier, and some debug
prints being repeated, but these aren't significantly detrimental. Let's
make things work first, then deal with making them nice.
With the basic flow finally in the right order again, the next step is
probably turning the bus->dma_configure paths inside-out, since all we
really need from bus code is its notion of which device and input ID(s)
to parse the common firmware properties with...

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 6b8bab3)
mainline inclusion
from mainline-v6.10-rc7
commit a27bf2743cb80d3b36b5b43e8e2e702412c41668
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

Commit <17de3f5fdd35> ("iommu: Retire bus ops") removes iommu ops from
bus. The iommu subsystem no longer relies on bus for operations. So the
bus parameter in iommu_domain_alloc() is no longer relevant.
Add a new interface named iommu_paging_domain_alloc(), which explicitly
indicates the allocation of a paging domain for DMA managed by a kernel
driver. The new interface takes a device pointer as its parameter, that
better aligns with the current iommu subsystem.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 0ebdfa6)
mainline inclusion
from mainline-v6.10-rc7
commit 26a581606fab44ff76b394f0ba44cd19c6ec0a6e
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

If the iommu driver doesn't implement its domain_alloc_user callback,
iommufd_hwpt_paging_alloc() rolls back to allocate an iommu paging domain.
Replace iommu_domain_alloc() with iommu_user_domain_alloc() to pass the
device pointer along the path.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 8c96c08)
mainline inclusion
from mainline-v6.10-rc7
commit 60ffc45017229ee8288ba139ee12c5ebf07c6f6a
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

Replace iommu_domain_alloc() with iommu_paging_domain_alloc().

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 7212794)
mainline inclusion
from mainline-v6.10-rc7
commit 9c159f6de1aedf200ac94eace47f6082399b561c
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

Replace iommu_domain_alloc() with iommu_paging_domain_alloc().

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit f948dea)
mainline inclusion
from mainline-v6.10-rc7
commit 45acf35af200b305d1e6119ca9de47aa4c3c45b9
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

The domain allocated in msm_iommu_new() is for the @dev. Replace
iommu_domain_alloc() with iommu_paging_domain_alloc() to make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit fda4323)
mainline inclusion
from mainline-v6.10-rc7
commit d5b7485588dffb39c5687e965623124ab7ebcd51
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

An iommu domain is allocated in ath10k_fw_init() and is attached to
ar_snoc->fw.dev in the same function. Use iommu_paging_domain_alloc() to
make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 58804d7)
mainline inclusion
from mainline-v6.10-rc7
commit ef50d41fbf1c95b07f636f4e268c53488a39284b
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

An iommu domain is allocated in ath11k_ahb_fw_resources_init() and is
attached to ab_ahb->fw.dev in the same function.
Use iommu_paging_domain_alloc() to make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 703579c)
mainline inclusion
from mainline-v6.10-rc7
commit bf7835facc09569eb038db7cfe42590d50b73567
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

In nvkm_device_tegra_probe_iommu(), a paging domain is allocated for @dev
and attached to it on success. Use iommu_paging_domain_alloc() to make it
explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 99d05ff)
mainline inclusion
from mainline-v6.10-rc7
commit 9719c7b8f33bc0268cf76656cfb6244f37586066
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

An iommu domain is allocated in host1x_iommu_attach() and is attached to
host->dev. Use iommu_paging_domain_alloc() to make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit d7a1095)
mainline inclusion
from mainline-v6.10-rc7
commit 93ee2d7ce2660a60d7e3d2706f53c31c5fb052e9
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

An iommu domain is allocated in tegra_vde_iommu_init() and is attached to
vde->dev. Use iommu_paging_domain_alloc() to make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 8c5ca9a)
mainline inclusion
from mainline-v6.10-rc7
commit 7ce555252c711f7520be42abba5c7401b3b68456
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

An iommu domain is allocated in venus_firmware_init() and is attached to
core->fw.dev in the same function. Use iommu_paging_domain_alloc() to
make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 3b53f53)
mainline inclusion
from mainline-v6.10-rc7
commit 8a8622b7c20658bf24b4d48dc53aaa893c37f482
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

An iommu domain is allocated in rproc_enable_iommu() and is attached to
rproc->dev.parent in the same function.
Use iommu_paging_domain_alloc() to make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 8cfafab)
mainline inclusion
from mainline-v6.10-rc7
commit 77a1a513083188f12361c45f08bdcfa508749b76
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

An iommu domain is allocated in portal_set_cpu() and is attached to
pcfg->dev in the same function.
Use iommu_paging_domain_alloc() to make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 0893d13)
mainline inclusion
from mainline-v6.10-rc7
commit 3b10f25704beefd0534f89db8323398c89b720e1
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

usnic_uiom_alloc_pd() allocates a paging domain for a given device.
In this case, iommu_domain_alloc(dev->bus) is equivalent to 
iommu_paging_domain_alloc(dev). Replace it as iommu_domain_alloc()
has been deprecated.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 656d5ba)
mainline inclusion
from mainline-v6.10-rc7
commit d8c07bee1e636db7ee6ab64b958f7bfdd9ff8c1e
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

Commit <421be3ee36a4> ("drm/rockchip: Refactor IOMMU initialisation") has
refactored rockchip_drm_init_iommu() to pass a device that the domain is
allocated for. Replace iommu_domain_alloc() with
iommu_paging_domain_alloc() to retire the former.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit d549cc1)
mainline inclusion
from mainline-v6.10-rc7
commit 45c690aea8ee5b7d012cd593bd288540a4bfdbf0
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

Commit <17de3f5fdd35> ("iommu: Retire bus ops") removes iommu ops from
the bus structure. The iommu subsystem no longer relies on bus for
operations. So iommu_domain_alloc() interface is no longer relevant.
Replace iommu_domain_alloc() with iommu_paging_domain_alloc() which takes
the physical device from which the host1x_device virtual device was
instantiated. This physical device is a common parent to all physical
devices that are part of the virtual device.
Suggested-by: Thierry Reding <thierry.reding@gmail.com>

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 810d25e)
mainline inclusion
from mainline-v6.10-rc7
commit 6632863226d88383c9e2bedfeeb928ac7f8232b9
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

The last callsite of iommu_present() is removed by commit <45c690aea8ee>
("drm/tegra: Use iommu_paging_domain_alloc()"). Remove it to avoid dead
code.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit ab22976)
mainline inclusion
from mainline-v6.10-rc7
commit f6440fcc9c7b7aaad2e52830ab83fa71990f76ff
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

The iommu_domain_alloc() interface is no longer used in the tree anymore.
Remove it to avoid dead code.
There is increasing demand for supporting multiple IOMMU drivers, and this
is the last bus-based thing standing in the way of that.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit 2571c30)
mainline inclusion
from mainline-v6.14-rc7
commit 73d2f10957f517e5918c81b7e859e214ba71c044
category: bugfix
bugzilla: RVCK-Project/rvck#142

--------------------------------

The warning for suspect probe conditions inadvertently got moved too
early in a prior respin - it happened to work out OK for fwspecs, but in
general still needs to be after the ops->probe_device call so drivers
which filter devices for themselves have a chance to do that.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: gaorui <gao.rui@zte.com.cn>
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
(cherry picked from commit bdeb506)
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026


开始测试 log: https://github.com/RVCK-Project/rvck-olk/actions/runs/24122457627

参数解析结果
args value
repository RVCK-Project/rvck-olk
head ref pull/169/head
base ref OLK-6.6
LAVA repo RVCK-Project/lavaci
LAVA Template lava-job-template/qemu/qemu-ltp.yaml
Testcase path lava-testcases/common-test/ltp/ltp.yaml
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:

RVCK result

check result
kunit-test success
kernel-build success
lava-trigger success
check-patch success

Kunit Test Result

[07:07:19] Testing complete. Ran 454 tests: passed: 442, skipped: 12

Kernel Build Result

Kernel build succeeded: RVCK-Project/rvck-olk/169__1/

0090586385ddc7024c03af23d1e0fb46 /srv/guix_result/db91f2e84ca7ece67854fb361f310467e01cc823/Image
9f5ab7e9990b9c59c57aee879a8369df /root/initramfs.img

LAVA Check

args:

result:

Lava check done! lava log: https://lava.oerv.ac.cn/scheduler/job/1761

lava result count: [fail]: 20, [pass]: 1586, [skip]: 293

Check Patch Result

Total Errors 0
Total Warnings 1

@xmzzz xmzzz merged commit eecea9f into OLK-6.6 Apr 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants