[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/68] vdpa: trace skipped memory sections
From: |
Michael S. Tsirkin |
Subject: |
[PULL 28/68] vdpa: trace skipped memory sections |
Date: |
Tue, 12 Mar 2024 18:26:56 -0400 |
From: Eugenio Pérez <eperezma@redhat.com>
Sometimes, certain parts are not being skipped in
vhost_vdpa_listener_region_del, but they are skipped in
vhost_vdpa_listener_region_add, or vice versa. The vhost-vdpa code
expects all parts to maintain their properties, so we're adding a trace
to help with debugging when any part is skipped.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20240215103616.330518-3-eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/vhost-vdpa.c | 3 +++
hw/virtio/trace-events | 1 +
2 files changed, 4 insertions(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 5559d4f89c..3bcd05cc22 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -55,6 +55,9 @@ static bool
vhost_vdpa_listener_skipped_section(MemoryRegionSection *section,
bool is_ram_device = memory_region_is_ram_device(section->mr);
if ((!is_ram && !is_iommu) || is_protected || is_ram_device) {
+ trace_vhost_vdpa_skipped_memory_section(is_ram, is_iommu, is_protected,
+ is_ram_device, iova_min,
+ iova_max, page_mask);
return true;
}
diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events
index 20577aa584..9df24864a2 100644
--- a/hw/virtio/trace-events
+++ b/hw/virtio/trace-events
@@ -30,6 +30,7 @@ vhost_user_write(uint32_t req, uint32_t flags) "req:%d
flags:0x%"PRIx32""
vhost_user_create_notifier(int idx, void *n) "idx:%d n:%p"
# vhost-vdpa.c
+vhost_vdpa_skipped_memory_section(int is_ram, int is_iommu, int is_protected,
int is_ram_device, uint64_t first, uint64_t last, int page_mask) "is_ram=%d,
is_iommu=%d, is_protected=%d, is_ram_device=%d iova_min=0x%"PRIx64"
iova_last=0x%"PRIx64" page_mask=0x%x"
vhost_vdpa_dma_map(void *vdpa, int fd, uint32_t msg_type, uint32_t asid,
uint64_t iova, uint64_t size, uint64_t uaddr, uint8_t perm, uint8_t type)
"vdpa_shared:%p fd: %d msg_type: %"PRIu32" asid: %"PRIu32" iova: 0x%"PRIx64"
size: 0x%"PRIx64" uaddr: 0x%"PRIx64" perm: 0x%"PRIx8" type: %"PRIu8
vhost_vdpa_dma_unmap(void *vdpa, int fd, uint32_t msg_type, uint32_t asid,
uint64_t iova, uint64_t size, uint8_t type) "vdpa_shared:%p fd: %d msg_type:
%"PRIu32" asid: %"PRIu32" iova: 0x%"PRIx64" size: 0x%"PRIx64" type: %"PRIu8
vhost_vdpa_listener_begin_batch(void *v, int fd, uint32_t msg_type, uint8_t
type) "vdpa_shared:%p fd: %d msg_type: %"PRIu32" type: %"PRIu8
--
MST
- [PULL 17/68] libvhost-user: No need to check for NULL when unmapping, (continued)
- [PULL 17/68] libvhost-user: No need to check for NULL when unmapping, Michael S. Tsirkin, 2024/03/12
- [PULL 18/68] libvhost-user: Don't zero out memory for memory regions, Michael S. Tsirkin, 2024/03/12
- [PULL 19/68] libvhost-user: Don't search for duplicates when removing memory regions, Michael S. Tsirkin, 2024/03/12
- [PULL 23/68] libvhost-user: Factor out vq usability check, Michael S. Tsirkin, 2024/03/12
- [PULL 26/68] pcie: Support PCIe Gen5/Gen6 link speeds, Michael S. Tsirkin, 2024/03/12
- [PULL 21/68] libvhost-user: Speedup gpa_to_mem_region() and vu_gpa_to_va(), Michael S. Tsirkin, 2024/03/12
- [PULL 22/68] libvhost-user: Use most of mmap_offset as fd_offset, Michael S. Tsirkin, 2024/03/12
- [PULL 27/68] vdpa: stash memory region properties in vars, Michael S. Tsirkin, 2024/03/12
- [PULL 20/68] libvhost-user: Factor out search for memory region by GPA and simplify, Michael S. Tsirkin, 2024/03/12
- [PULL 24/68] libvhost-user: Dynamically remap rings after (temporarily?) removing memory regions, Michael S. Tsirkin, 2024/03/12
- [PULL 28/68] vdpa: trace skipped memory sections,
Michael S. Tsirkin <=
- [PULL 29/68] hw/pci-bridge/pxb-cxl: Drop RAS capability from host bridge., Michael S. Tsirkin, 2024/03/12
- [PULL 30/68] hw/audio/virtio-sound: return correct command response size, Michael S. Tsirkin, 2024/03/12
- [PULL 31/68] hw/virtio: check owner for removing objects, Michael S. Tsirkin, 2024/03/12
- [PULL 33/68] hw/cxl/cxl-host: Fix missing ERRP_GUARD() in cxl_fixed_memory_window_config(), Michael S. Tsirkin, 2024/03/12
- [PULL 25/68] libvhost-user: Mark mmap'ed region memory as MADV_DONTDUMP, Michael S. Tsirkin, 2024/03/12
- [PULL 32/68] hw/virtio: Add support for VDPA network simulation devices, Michael S. Tsirkin, 2024/03/12
- [PULL 34/68] hw/display/macfb: Fix missing ERRP_GUARD() in macfb_nubus_realize(), Michael S. Tsirkin, 2024/03/12