summaryrefslogtreecommitdiffstats
path: root/hw/vfio/trace-events
diff options
context:
space:
mode:
authorAlexey Kardashevskiy2016-07-04 05:33:06 +0200
committerDavid Gibson2016-07-05 06:31:08 +0200
commit2e4109de8e589beecd69996ee14f24021b991c0d (patch)
tree6ae3ddcd94419eada161c30501ec0df834790486 /hw/vfio/trace-events
parentvfio: Add host side DMA window capabilities (diff)
downloadqemu-2e4109de8e589beecd69996ee14f24021b991c0d.tar.gz
qemu-2e4109de8e589beecd69996ee14f24021b991c0d.tar.xz
qemu-2e4109de8e589beecd69996ee14f24021b991c0d.zip
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>
Diffstat (limited to 'hw/vfio/trace-events')
-rw-r--r--hw/vfio/trace-events2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events
index 0b02a3bd54..4bb7690c46 100644
--- a/hw/vfio/trace-events
+++ b/hw/vfio/trace-events
@@ -121,3 +121,5 @@ vfio_prereg_listener_region_add_skip(uint64_t start, uint64_t end) "%"PRIx64" -
vfio_prereg_listener_region_del_skip(uint64_t start, uint64_t end) "%"PRIx64" - %"PRIx64
vfio_prereg_register(uint64_t va, uint64_t size, int ret) "va=%"PRIx64" size=%"PRIx64" ret=%d"
vfio_prereg_unregister(uint64_t va, uint64_t size, int ret) "va=%"PRIx64" size=%"PRIx64" ret=%d"
+vfio_spapr_create_window(int ps, uint64_t ws, uint64_t off) "pageshift=0x%x winsize=0x%"PRIx64" offset=0x%"PRIx64
+vfio_spapr_remove_window(uint64_t off) "offset=%"PRIx64