[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/16] util/vfio-helpers: Improve DMA trace events
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 08/16] util/vfio-helpers: Improve DMA trace events |
Date: |
Tue, 20 Oct 2020 19:24:20 +0200 |
For debugging purpose, trace where DMA regions are mapped.
Reviewed-by: Fam Zheng <fam@euphon.net>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
util/vfio-helpers.c | 3 ++-
util/trace-events | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c
index 95e010bed6d..98a377a01a8 100644
--- a/util/vfio-helpers.c
+++ b/util/vfio-helpers.c
@@ -657,7 +657,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));
@@ -813,6 +813,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;
}
diff --git a/util/trace-events b/util/trace-events
index 7c92f2f8c1a..c396ef4d622 100644
--- a/util/trace-events
+++ b/util/trace-events
@@ -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_iommu_iova_pgsizes(uint64_t iova_pgsizes) "iommu page size bitmask:
0x%08"PRIx64
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 %d (region ofs 0x%"PRIx64"
size %"PRId64")"
--
2.26.2
- [PATCH 01/16] block/nvme: Correct minimum device page size, (continued)
- [PATCH 01/16] block/nvme: Correct minimum device page size, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 04/16] util/vfio-helpers: Report error when IOMMU page size is not supported, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 05/16] util/vfio-helpers: Trace PCI I/O config accesses, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 06/16] util/vfio-helpers: Trace PCI BAR region info, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 07/16] util/vfio-helpers: Trace where BARs are mapped, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 08/16] util/vfio-helpers: Improve DMA trace events,
Philippe Mathieu-Daudé <=
- [PATCH 09/16] util/vfio-helpers: Convert vfio_dump_mapping to trace events, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 10/16] util/vfio-helpers: Let qemu_vfio_dma_map() propagate Error, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 11/16] util/vfio-helpers: Let qemu_vfio_do_mapping() propagate Error, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 12/16] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report(), Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 13/16] util/vfio-helpers: Introduce qemu_vfio_pci_msix_init_irqs(), Philippe Mathieu-Daudé, 2020/10/20