Re: [PATCH] iommu/virtio: Handle iommu_device_register() failures

Will Deacon <[email protected]>
Newsgroups dev.linux.lists.iommu,dev.linux.lists.virtualization,org.kernel.vger.linux-kernel
Message-ID <amE5PCkhwq84-_6g@willie-the-truck>
On Thu, Jul 16, 2026 at 09:21:57AM +0800, Weimin Xiong wrote:
> From: Xiong Weimin <[email protected]>
> 
> iommu_device_register() returns an error when the IOMMU core fails to
> register the hardware instance or probe the buses. viommu_probe()
> currently ignores that error and continues as if the device was
> registered successfully.
> 
> Propagate the failure and unwind the sysfs entry and virtqueues that
> were set up earlier. Clear the driver data on the error path as well,
> since it is set before registration so bus probing can find the
> virtio-IOMMU instance.
> 
> Signed-off-by: Xiong Weimin <[email protected]>
> ---
>  drivers/iommu/virtio-iommu.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

It's really hard to keep track of all the patches you have on the list.

Some of them are grouped in a series [1] with a dependency on another
unmerged patch, others are in-reply to unordered patches [2], nothing is
versioned and there are unlinked reply-to messages asking us to ignore
things [3].

Please can you group all related changes into a series, with a cover
letter and then use versioning so that it's clear which is the latest
revision?

As an aside, Sashiko has lots of comments about the error handling in
the virtio IOMMU probe:

https://sashiko.dev/#/patchset/[email protected]

Will

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
[3] https://lore.kernel.org/all/[email protected]/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.