qemu-patch-raspberry4/hw/vfio
Alexey Kardashevskiy d78c19b5cf memory: Fix IOMMU replay base address
Since a788f227 "memory: Allow replay of IOMMU mapping notifications"
when new VFIO listener is added, all existing IOMMU mappings are
replayed. However there is a problem that the base address of
an IOMMU memory region (IOMMU MR) is ignored which is not a problem
for the existing user (which is pseries) with its default 32bit DMA
window starting at 0 but it is if there is another DMA window.

This stores the IOMMU's offset_within_address_space and adjusts
the IOVA before calling vfio_dma_map/vfio_dma_unmap.

As the IOMMU notifier expects IOVA offset rather than the absolute
address, this also adjusts IOVA in sPAPR H_PUT_TCE handler before
calling notifier(s).

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2016-05-26 11:12:08 -06:00
..
amd-xgbe.c all: Clean up includes 2016-02-23 12:43:05 +00:00
calxeda-xgmac.c hw/vfio: Clean up includes 2016-01-29 15:07:24 +00:00
common.c memory: Fix IOMMU replay base address 2016-05-26 11:12:08 -06:00
Makefile.objs hw/vfio/platform: amd-xgbe device 2016-02-19 09:42:29 -07:00
pci-quirks.c vfio/pci: Add a separate option for IGD OpRegion support 2016-05-26 11:12:03 -06:00
pci.c vfio/pci: Add a separate option for IGD OpRegion support 2016-05-26 11:12:03 -06:00
pci.h vfio/pci: Add a separate option for IGD OpRegion support 2016-05-26 11:12:03 -06:00
platform.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00