mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
util/vfio-helpers: Improve DMA trace events
For debugging purpose, trace where DMA regions are mapped. Reviewed-by: Fam Zheng <fam@euphon.net> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201103020733.2303148-6-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>
This commit is contained in:
parent
2817fbcee0
commit
4c946b2236
@ -82,8 +82,9 @@ qemu_vfio_ram_block_added(void *s, void *p, size_t size) "s %p host %p size 0x%z
|
||||
qemu_vfio_ram_block_removed(void *s, void *p, size_t size) "s %p host %p size 0x%zx"
|
||||
qemu_vfio_find_mapping(void *s, void *p) "s %p host %p"
|
||||
qemu_vfio_new_mapping(void *s, void *host, size_t size, int index, uint64_t iova) "s %p host %p size 0x%zx index %d iova 0x%"PRIx64
|
||||
qemu_vfio_do_mapping(void *s, void *host, size_t size, uint64_t iova) "s %p host %p size 0x%zx iova 0x%"PRIx64
|
||||
qemu_vfio_dma_map(void *s, void *host, size_t size, bool temporary, uint64_t *iova) "s %p host %p size 0x%zx temporary %d iova %p"
|
||||
qemu_vfio_do_mapping(void *s, void *host, uint64_t iova, size_t size) "s %p host %p <-> iova 0x%"PRIx64 " size 0x%zx"
|
||||
qemu_vfio_dma_map(void *s, void *host, size_t size, bool temporary, uint64_t *iova) "s %p host %p size 0x%zx temporary %d &iova %p"
|
||||
qemu_vfio_dma_mapped(void *s, void *host, uint64_t iova, size_t size) "s %p host %p <-> iova 0x%"PRIx64" size 0x%zx"
|
||||
qemu_vfio_dma_unmap(void *s, void *host) "s %p host %p"
|
||||
qemu_vfio_pci_read_config(void *buf, int ofs, int size, uint64_t region_ofs, uint64_t region_size) "read cfg ptr %p ofs 0x%x size 0x%x (region addr 0x%"PRIx64" size 0x%"PRIx64")"
|
||||
qemu_vfio_pci_write_config(void *buf, int ofs, int size, uint64_t region_ofs, uint64_t region_size) "write cfg ptr %p ofs 0x%x size 0x%x (region addr 0x%"PRIx64" size 0x%"PRIx64")"
|
||||
|
@ -627,7 +627,7 @@ static int qemu_vfio_do_mapping(QEMUVFIOState *s, void *host, size_t size,
|
||||
.vaddr = (uintptr_t)host,
|
||||
.size = size,
|
||||
};
|
||||
trace_qemu_vfio_do_mapping(s, host, size, iova);
|
||||
trace_qemu_vfio_do_mapping(s, host, iova, size);
|
||||
|
||||
if (ioctl(s->container, VFIO_IOMMU_MAP_DMA, &dma_map)) {
|
||||
error_report("VFIO_MAP_DMA failed: %s", strerror(errno));
|
||||
@ -783,6 +783,7 @@ int qemu_vfio_dma_map(QEMUVFIOState *s, void *host, size_t size,
|
||||
}
|
||||
}
|
||||
}
|
||||
trace_qemu_vfio_dma_mapped(s, host, iova0, size);
|
||||
if (iova) {
|
||||
*iova = iova0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user