[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 49/63] hw/vfio/common: Add vfio_listener_region_del_iommu trace ev
From: |
Michael S. Tsirkin |
Subject: |
[PULL 49/63] hw/vfio/common: Add vfio_listener_region_del_iommu trace event |
Date: |
Sun, 21 Jul 2024 20:18:34 -0400 |
From: Eric Auger <eric.auger@redhat.com>
Trace when VFIO gets notified about the deletion of an IOMMU MR.
Also trace the name of the region in the add_iommu trace message.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20240716094619.1713905-6-eric.auger@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/vfio/common.c | 3 ++-
hw/vfio/trace-events | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 6d15b36e0b..cfc44a4569 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -599,7 +599,7 @@ static void vfio_listener_region_add(MemoryListener
*listener,
IOMMUMemoryRegion *iommu_mr = IOMMU_MEMORY_REGION(section->mr);
int iommu_idx;
- trace_vfio_listener_region_add_iommu(iova, end);
+ trace_vfio_listener_region_add_iommu(section->mr->name, iova, end);
/*
* FIXME: For VFIO iommu types which have KVM acceleration to
* avoid bouncing all map/unmaps through qemu this way, this
@@ -725,6 +725,7 @@ static void vfio_listener_region_del(MemoryListener
*listener,
if (memory_region_is_iommu(section->mr)) {
VFIOGuestIOMMU *giommu;
+ trace_vfio_listener_region_del_iommu(section->mr->name);
QLIST_FOREACH(giommu, &bcontainer->giommu_list, giommu_next) {
if (MEMORY_REGION(giommu->iommu_mr) == section->mr &&
giommu->n.start == section->offset_within_region) {
diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events
index e16179b507..98bd4dccea 100644
--- a/hw/vfio/trace-events
+++ b/hw/vfio/trace-events
@@ -95,7 +95,8 @@ vfio_region_read(char *name, int index, uint64_t addr,
unsigned size, uint64_t d
vfio_iommu_map_notify(const char *op, uint64_t iova_start, uint64_t iova_end)
"iommu %s @ 0x%"PRIx64" - 0x%"PRIx64
vfio_listener_region_skip(const char *name, uint64_t start, uint64_t end)
"SKIPPING %s 0x%"PRIx64" - 0x%"PRIx64
vfio_spapr_group_attach(int groupfd, int tablefd) "Attached groupfd %d to
liobn fd %d"
-vfio_listener_region_add_iommu(uint64_t start, uint64_t end) "region_add
[iommu] 0x%"PRIx64" - 0x%"PRIx64
+vfio_listener_region_add_iommu(const char* name, uint64_t start, uint64_t end)
"region_add [iommu] %s 0x%"PRIx64" - 0x%"PRIx64
+vfio_listener_region_del_iommu(const char *name) "region_del [iommu] %s"
vfio_listener_region_add_ram(uint64_t iova_start, uint64_t iova_end, void
*vaddr) "region_add [ram] 0x%"PRIx64" - 0x%"PRIx64" [%p]"
vfio_known_safe_misalignment(const char *name, uint64_t iova, uint64_t
offset_within_region, uintptr_t page_size) "Region \"%s\" iova=0x%"PRIx64"
offset_within_region=0x%"PRIx64" qemu_real_host_page_size=0x%"PRIxPTR
vfio_listener_region_add_no_dma_map(const char *name, uint64_t iova, uint64_t
size, uint64_t page_size) "Region \"%s\" 0x%"PRIx64" size=0x%"PRIx64" is not
aligned to 0x%"PRIx64" and cannot be mapped for DMA"
--
MST
- [PULL 36/63] docs: Document composable SR-IOV device, (continued)
- [PULL 36/63] docs: Document composable SR-IOV device, Michael S. Tsirkin, 2024/07/21
- [PULL 37/63] smbios: make memory device size configurable per Machine, Michael S. Tsirkin, 2024/07/21
- [PULL 38/63] accel/kvm: Extract common KVM vCPU {creation,parking} code, Michael S. Tsirkin, 2024/07/21
- [PULL 39/63] hw/acpi: Move CPU ctrl-dev MMIO region len macro to common header file, Michael S. Tsirkin, 2024/07/21
- [PULL 40/63] hw/acpi: Update ACPI GED framework to support vCPU Hotplug, Michael S. Tsirkin, 2024/07/21
- [PULL 50/63] virtio-iommu: Add trace point on virtio_iommu_detach_endpoint_from_domain, Michael S. Tsirkin, 2024/07/21
- [PULL 41/63] hw/acpi: Update GED _EVT method AML with CPU scan, Michael S. Tsirkin, 2024/07/21
- [PULL 47/63] virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices, Michael S. Tsirkin, 2024/07/21
- [PULL 44/63] gdbstub: Add helper function to unregister GDB register space, Michael S. Tsirkin, 2024/07/21
- [PULL 46/63] virtio-iommu: Remove probe_done, Michael S. Tsirkin, 2024/07/21
- [PULL 49/63] hw/vfio/common: Add vfio_listener_region_del_iommu trace event,
Michael S. Tsirkin <=
- [PULL 55/63] tests/acpi: update expected DSDT blob for aarch64 and microvm, Michael S. Tsirkin, 2024/07/21
- [PULL 45/63] Revert "virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged", Michael S. Tsirkin, 2024/07/21
- [PULL 42/63] hw/acpi: Update CPUs AML with cpu-(ctrl)dev change, Michael S. Tsirkin, 2024/07/21
- [PULL 51/63] hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC, Michael S. Tsirkin, 2024/07/21
- [PULL 52/63] hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART, Michael S. Tsirkin, 2024/07/21
- [PULL 43/63] physmem: Add helper function to destroy CPU AddressSpace, Michael S. Tsirkin, 2024/07/21
- [PULL 48/63] virtio-iommu: Remove the end point on detach, Michael S. Tsirkin, 2024/07/21
- [PULL 61/63] backends: Initial support for SPDM socket support, Michael S. Tsirkin, 2024/07/21
- [PULL 54/63] acpi/gpex: Create PCI link devices outside PCI root bridge, Michael S. Tsirkin, 2024/07/21
- [PULL 53/63] tests/acpi: Allow DSDT acpi table changes for aarch64, Michael S. Tsirkin, 2024/07/21