[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/23] vfio: trace map/unmap for notify as well
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 15/23] vfio: trace map/unmap for notify as well |
Date: |
Fri, 17 Feb 2017 21:54:43 +0200 |
From: Peter Xu <address@hidden>
We traces its range, but we don't know whether it's a MAP/UNMAP. Let's
dump it as well.
Acked-by: Alex Williamson <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/vfio/common.c | 3 ++-
hw/vfio/trace-events | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 801578b..174f351 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -305,7 +305,8 @@ static void vfio_iommu_map_notify(IOMMUNotifier *n,
IOMMUTLBEntry *iotlb)
void *vaddr;
int ret;
- trace_vfio_iommu_map_notify(iova, iova + iotlb->addr_mask);
+ trace_vfio_iommu_map_notify(iotlb->perm == IOMMU_NONE ? "UNMAP" : "MAP",
+ iova, iova + iotlb->addr_mask);
if (iotlb->target_as != &address_space_memory) {
error_report("Wrong target AS \"%s\", only system memory is allowed",
diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events
index 8de8281..2561c6d 100644
--- a/hw/vfio/trace-events
+++ b/hw/vfio/trace-events
@@ -84,7 +84,7 @@ vfio_pci_igd_lpc_bridge_enabled(const char *name) "%s"
# hw/vfio/common.c
vfio_region_write(const char *name, int index, uint64_t addr, uint64_t data,
unsigned size) " (%s:region%d+0x%"PRIx64", 0x%"PRIx64 ", %d)"
vfio_region_read(char *name, int index, uint64_t addr, unsigned size, uint64_t
data) " (%s:region%d+0x%"PRIx64", %d) = 0x%"PRIx64
-vfio_iommu_map_notify(uint64_t iova_start, uint64_t iova_end) "iommu map @
%"PRIx64" - %"PRIx64
+vfio_iommu_map_notify(const char *op, uint64_t iova_start, uint64_t iova_end)
"iommu %s @ %"PRIx64" - %"PRIx64
vfio_listener_region_add_skip(uint64_t start, uint64_t end) "SKIPPING
region_add %"PRIx64" - %"PRIx64
vfio_listener_region_add_iommu(uint64_t start, uint64_t end) "region_add
[iommu] %"PRIx64" - %"PRIx64
vfio_listener_region_add_ram(uint64_t iova_start, uint64_t iova_end, void
*vaddr) "region_add [ram] %"PRIx64" - %"PRIx64" [%p]"
--
MST
- [Qemu-devel] [PULL 07/23] exec: make address_space_cache_destroy idempotent, (continued)
- [Qemu-devel] [PULL 07/23] exec: make address_space_cache_destroy idempotent, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 06/23] virtio: use address_space_map/unmap to access descriptors, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 08/23] virtio: use MemoryRegionCache to access descriptors, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 09/23] virtio: add MemoryListener to cache ring translations, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 11/23] virtio: check for vring setup in virtio_queue_update_used_idx, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 10/23] virtio: use VRingMemoryRegionCaches for descriptor ring, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 13/23] virtio: Fix no interrupt when not creating msi controller, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 14/23] pcie: simplify pcie_add_capability(), Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 16/23] vfio: introduce vfio_get_vaddr(), Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 15/23] vfio: trace map/unmap for notify as well,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 17/23] vfio: allow to notify unmap for very large region, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 18/23] intel_iommu: add "caching-mode" option, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 19/23] intel_iommu: simplify irq region translation, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 20/23] intel_iommu: renaming gpa to iova where proper, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 23/23] intel_iommu: vtd_slpt_level_shift check level, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 22/23] intel_iommu: convert dbg macros to trace for trans, Michael S. Tsirkin, 2017/02/17
- [Qemu-devel] [PULL 21/23] intel_iommu: convert dbg macros to traces for inv, Michael S. Tsirkin, 2017/02/17
- Re: [Qemu-devel] [PULL 00/23] virtio, pci: fixes, features, Peter Maydell, 2017/02/20