qemu/hw/vfio
Eric Auger 5c08600547 vfio: Use a trace point when a RAM section cannot be DMA mapped
Commit 567b5b309a ("vfio/pci: Relax DMA map errors for MMIO regions")
added an error message if a passed memory section address or size
is not aligned to the page size and thus cannot be DMA mapped.

This patch fixes the trace by printing the region name and the
memory region section offset within the address space (instead of
offset_within_region).

We also turn the error_report into a trace event. Indeed, In some
cases, the traces can be confusing to non expert end-users and
let think the use case does not work (whereas it works as before).

This is the case where a BAR is successively mapped at different
GPAs and its sections are not compatible with dma map. The listener
is called several times and traces are issued for each intermediate
mapping.  The end-user cannot easily match those GPAs against the
final GPA output by lscpi. So let's keep those information to
informed users. In mid term, the plan is to advise the user about
BAR relocation relevance.

Fixes: 567b5b309a ("vfio/pci: Relax DMA map errors for MMIO regions")
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2018-04-05 10:48:52 -06:00
..
amd-xgbe.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
calxeda-xgmac.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
ccw.c vfio-ccw: license text should indicate GPL v2 or later 2018-03-08 15:49:23 +01:00
common.c vfio: Use a trace point when a RAM section cannot be DMA mapped 2018-04-05 10:48:52 -06:00
display.c vfio/display: adding dmabuf support 2018-03-13 11:17:30 -06:00
Makefile.objs vfio/display: core & wireup 2018-03-13 11:17:29 -06:00
pci-quirks.c vfio/pci: Add option to disable GeForce quirks 2018-02-06 11:08:27 -07:00
pci.c ppc/spapr, vfio: Turn off MSIX emulation for VFIO devices 2018-03-13 11:17:31 -06:00
pci.h vfio/display: adding region support 2018-03-13 11:17:30 -06:00
platform.c use g_path_get_basename instead of basename 2018-03-06 14:01:29 +01:00
spapr.c vfio, spapr: Fix levels calculation 2017-09-15 10:29:48 +10:00
trace-events vfio: Use a trace point when a RAM section cannot be DMA mapped 2018-04-05 10:48:52 -06:00