vfio: Remove reports of DMA mapping errors in backends
authorCédric Le Goater <clg@redhat.com>
Thu, 6 Feb 2025 13:14:34 +0000 (14:14 +0100)
committerCédric Le Goater <clg@redhat.com>
Tue, 11 Feb 2025 13:15:19 +0000 (14:15 +0100)
commit889695f8f3c10647cc27a3788b4a3f1d0192926c
treeaf6c7c9a3e03b9a30e0a6d2e138a70d26f7eef41
parentaaec00422ba6538ca3e6bfa612bbae155ec15c84
vfio: Remove reports of DMA mapping errors in backends

Currently, the mapping handlers of the IOMMU backends, VFIO IOMMU Type
1 aka. legacy and IOMMUFD, return an errno and also report an error.
This can lead to excessive log messages at runtime for recurring DMA
mapping errors. Since these errors are already reported by the callers
in the vfio_container_dma_un/map() routines, simply remove them and
allow the callers to handle the reporting.

The mapping handler of the IOMMUFD backend has a comment suggesting
MMIO region mapping failures return EFAULT. I am not sure this is
entirely true, so keep the EFAULT case until the conditions are
clarified.

Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250206131438.1505542-7-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
backends/iommufd.c
hw/vfio/container.c