Skip to content

vfio: Improve error reporting when MMIO region mapping fails

Cédric Le Goater qemu-devel 3 versions – Applied

Status from this message: Applied to vfio-next.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 5 repliesApplied
  2. v29 patches 25 repliesSuperseded
  3. v15 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Fixed warn_report_err_once()
- Improved commit logs a bit
- Dropped check on compatibility of CPU and IOMMU address space width. Will address later in its own series.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/7util/error: Introduce warn_report_err_once()include/qapi/error.h util/error.c+23 -02 replies
2/7vfio/pci: Replace "iommu_device" by "vIOMMU"hw/vfio/pci.c+1 -10 replies
3/7vfio: Rephrase comment in vfio_listener_region_add() error pathhw/vfio/common.c+10 -50 replies
4/7vfio: Introduce vfio_get_vfio_device()hw/vfio/helpers.c include/hw/vfio/vfio-common.h+11 -00 replies
5/7vfio: Improve error reporting when MMIO region mapping failshw/vfio/common.c+16 -10 replies
6/7vfio: Remove reports of DMA mapping errors in backendsbackends/iommufd.c hw/vfio/container.c+0 -50 replies
7/7vfio: Remove superfluous error report in vfio_listener_region_add()hw/vfio/common.c+4 -61 reply

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchHarsh Prateek BoraAlex WilliamsonMarkus Armbruster
SeriesR-b
1/7R-b
2/7
3/7
4/7
5/7
6/7
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/7] vfio: Improve error reporting when MMIO region mapping fails

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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 Intel 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 v3:

- Fixed warn_report_err_once()
- Improved commit logs a bit
- Dropped check on compatibility of CPU and IOMMU address space width. Will address later in its own series.

Changes in v2:

- Removed advice 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 (7):
util/error: Introduce warn_report_err_once()
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
vfio: Remove superfluous error report in vfio_listener_region_add()

 include/hw/vfio/vfio-common.h |  1 +
 include/qapi/error.h          | 12 +++++++++++
 backends/iommufd.c            |  3 ---
 hw/vfio/common.c              | 40 +++++++++++++++++++++++++----------
 hw/vfio/container.c           |  2 --
 hw/vfio/helpers.c             | 10 +++++++++
 hw/vfio/pci.c                 |  2 +-
 util/error.c                  | 11 ++++++++++
 8 files changed, 64 insertions(+), 17 deletions(-)
Signature · 1 line
2.48.1