qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9]vfio: Improve error reporting when MMIO region mapping fails
@ 2025-01-30 13:43 Cédric Le Goater
  2025-01-30 13:43 ` [PATCH v2 1/9] util/error: Introduce warn_report_once_err() Cédric Le Goater
                   ` (8 more replies)
  0 siblings, 9 replies; 35+ messages in thread
From: Cédric Le Goater @ 2025-01-30 13:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Williamson, Cédric Le Goater

Hello,

Under certain circumstances, a MMIO region of a device fails to map
because the region is outside the supported IOVA ranges of the VM. In
this case, PCI peer-to-peer transactions on BARs are not supported.
This typically occurs when the IOMMU address space width is less than
the physical address width, as can be the case on some consumer
processors or when using a vIOMMU device with default settings.

This series tries to clarify the error message reported to the user.

Thanks,

C.

Changes in v2:

 - Removed advices on how to resolve the issue. Diagnostic is enough.
 - Introduced helpers
 - Checked device type, since this only applies to PCI
 - Added cleanup

Cédric Le Goater (9):
  util/error: Introduce warn_report_once_err()
  vfio/pci: Replace "iommu_device" by "vIOMMU"
  vfio: Rephrase comment in vfio_listener_region_add() error path
  vfio: Introduce vfio_get_vfio_device()
  vfio: Improve error reporting when MMIO region mapping fails
  vfio: Remove reports of DMA mapping errors in backends
  cpu: Introduce cpu_get_phys_bits()
  vfio: Check compatibility of CPU and IOMMU address space width
  vfio: Remove superfluous error report in vfio_listener_region_add()

 include/hw/core/cpu.h            |  9 +++++
 include/hw/core/sysemu-cpu-ops.h |  6 ++++
 include/hw/vfio/vfio-common.h    |  1 +
 include/qapi/error.h             |  5 +++
 backends/iommufd.c               |  3 --
 cpu-target.c                     |  5 +++
 hw/core/cpu-system.c             | 11 ++++++
 hw/vfio/common.c                 | 61 ++++++++++++++++++++++++++------
 hw/vfio/container.c              |  2 --
 hw/vfio/helpers.c                | 10 ++++++
 hw/vfio/pci.c                    |  2 +-
 target/i386/cpu.c                |  6 ++++
 util/error.c                     |  9 +++++
 13 files changed, 113 insertions(+), 17 deletions(-)

-- 
2.48.1



^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2025-09-08  8:37 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-30 13:43 [PATCH v2 0/9]vfio: Improve error reporting when MMIO region mapping fails Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 1/9] util/error: Introduce warn_report_once_err() Cédric Le Goater
2025-01-30 14:25   ` Markus Armbruster
2025-01-30 16:03     ` Cédric Le Goater
2025-01-30 16:28       ` Cédric Le Goater
2025-01-30 17:55   ` Alex Williamson
2025-01-30 21:26     ` Cédric Le Goater
2025-01-31  8:30       ` Markus Armbruster
2025-01-30 13:43 ` [PATCH v2 2/9] vfio/pci: Replace "iommu_device" by "vIOMMU" Cédric Le Goater
2025-02-10 14:28   ` Philippe Mathieu-Daudé
2025-01-30 13:43 ` [PATCH v2 3/9] vfio: Rephrase comment in vfio_listener_region_add() error path Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 4/9] vfio: Introduce vfio_get_vfio_device() Cédric Le Goater
2025-02-10 14:32   ` Philippe Mathieu-Daudé
2025-02-10 16:19     ` Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 5/9] vfio: Improve error reporting when MMIO region mapping fails Cédric Le Goater
2025-02-10 14:36   ` Philippe Mathieu-Daudé
2025-02-10 16:17     ` Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 6/9] vfio: Remove reports of DMA mapping errors in backends Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 7/9] cpu: Introduce cpu_get_phys_bits() Cédric Le Goater
2025-02-10 14:40   ` Philippe Mathieu-Daudé
2025-03-06 10:37   ` Philippe Mathieu-Daudé
2025-03-06 14:41     ` Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 8/9] vfio: Check compatibility of CPU and IOMMU address space width Cédric Le Goater
2025-01-30 18:58   ` Alex Williamson
2025-01-31 12:42     ` Cédric Le Goater
2025-01-31 13:23       ` Gerd Hoffmann
2025-01-31 17:03         ` Cédric Le Goater
2025-02-06  7:54           ` Gerd Hoffmann
2025-02-06 17:05             ` Cédric Le Goater
2025-01-31 22:18         ` Alex Williamson
2025-02-06  8:22           ` Gerd Hoffmann
2025-03-06 10:33   ` Philippe Mathieu-Daudé
2025-09-05 13:04   ` Daniel Kral
2025-09-08  8:35     ` Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 9/9] vfio: Remove superfluous error report in vfio_listener_region_add() Cédric Le Goater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).