[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 48/61] hw/vfio/common: Add vfio_listener_region_del_iommu trace
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 48/61] hw/vfio/common: Add vfio_listener_region_del_iommu trace event |
Date: |
Tue, 23 Jul 2024 07:00:11 -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 v2 39/61] hw/acpi: Update ACPI GED framework to support vCPU Hotplug, (continued)
- [PULL v2 39/61] hw/acpi: Update ACPI GED framework to support vCPU Hotplug, Michael S. Tsirkin, 2024/07/23
- [PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan, Michael S. Tsirkin, 2024/07/23
- [PULL v2 41/61] hw/acpi: Update CPUs AML with cpu-(ctrl)dev change, Michael S. Tsirkin, 2024/07/23
- [PULL v2 42/61] physmem: Add helper function to destroy CPU AddressSpace, Michael S. Tsirkin, 2024/07/23
- [PULL v2 43/61] gdbstub: Add helper function to unregister GDB register space, Michael S. Tsirkin, 2024/07/23
- [PULL v2 45/61] virtio-iommu: Remove probe_done, Michael S. Tsirkin, 2024/07/23
- [PULL v2 44/61] Revert "virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged", Michael S. Tsirkin, 2024/07/23
- [PULL v2 46/61] virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices, Michael S. Tsirkin, 2024/07/23
- [PULL v2 50/61] hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC, Michael S. Tsirkin, 2024/07/23
- [PULL v2 47/61] virtio-iommu: Remove the end point on detach, Michael S. Tsirkin, 2024/07/23
- [PULL v2 48/61] hw/vfio/common: Add vfio_listener_region_del_iommu trace event,
Michael S. Tsirkin <=
- [PULL v2 49/61] virtio-iommu: Add trace point on virtio_iommu_detach_endpoint_from_domain, Michael S. Tsirkin, 2024/07/23
- [PULL v2 51/61] hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART, Michael S. Tsirkin, 2024/07/23
- [PULL v2 53/61] acpi/gpex: Create PCI link devices outside PCI root bridge, Michael S. Tsirkin, 2024/07/23
- [PULL v2 52/61] tests/acpi: Allow DSDT acpi table changes for aarch64, Michael S. Tsirkin, 2024/07/23
- [PULL v2 54/61] tests/acpi: update expected DSDT blob for aarch64 and microvm, Michael S. Tsirkin, 2024/07/23
- [PULL v2 55/61] tests/qtest/bios-tables-test.c: Remove the fall back path, Michael S. Tsirkin, 2024/07/23
- [PULL v2 56/61] tests/acpi: Add empty ACPI data files for RISC-V, Michael S. Tsirkin, 2024/07/23
- [PULL v2 57/61] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V, Michael S. Tsirkin, 2024/07/23
- [PULL v2 58/61] tests/acpi: Add expected ACPI AML files for RISC-V, Michael S. Tsirkin, 2024/07/23
- [PULL v2 59/61] hw/pci: Add all Data Object Types defined in PCIe r6.0, Michael S. Tsirkin, 2024/07/23