qemu-e2k/hw/vfio
Alexey Kardashevskiy 2e4109de8e vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2)
New VFIO_SPAPR_TCE_v2_IOMMU type supports dynamic DMA window management.
This adds ability to VFIO common code to dynamically allocate/remove
DMA windows in the host kernel when new VFIO container is added/removed.

This adds a helper to vfio_listener_region_add which makes
VFIO_IOMMU_SPAPR_TCE_CREATE ioctl and adds just created IOMMU into
the host IOMMU list; the opposite action is taken in
vfio_listener_region_del.

When creating a new window, this uses heuristic to decide on the TCE table
levels number.

This should cause no guest visible change in behavior.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
[dwg: Added some casts to prevent printf() warnings on certain targets
 where the kernel headers' __u64 doesn't match uint64_t or PRIx64]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-07-05 14:31:08 +10:00
..
Makefile.objs vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2) 2016-07-05 14:30:54 +10: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 vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2) 2016-07-05 14:31:08 +10:00
pci-quirks.c vfio/pci: Fix VGA quirks 2016-06-30 13:00:22 -06:00
pci.c vfio/pci: Hide SR-IOV capability 2016-06-30 13:00:23 -06:00
pci.h vfio/pci: Fix VGA quirks 2016-06-30 13:00:22 -06:00
platform.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
spapr.c vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2) 2016-07-05 14:31:08 +10:00
trace-events vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2) 2016-07-05 14:31:08 +10:00