[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 60/91] hw/virtio: add vhost_user_[read|write] trace points
From: |
Michael S. Tsirkin |
Subject: |
[PULL 60/91] hw/virtio: add vhost_user_[read|write] trace points |
Date: |
Mon, 16 May 2022 06:39:08 -0400 |
From: Alex Bennée <alex.bennee@linaro.org>
These are useful when trying to debug the initial vhost-user
negotiation, especially when it hard to get logging from the low level
library on the other side.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220321153037.3622127-4-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/virtio/vhost-user.c | 4 ++++
hw/virtio/trace-events | 2 ++
2 files changed, 6 insertions(+)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index afd51f79b3..6c8f722262 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -489,6 +489,8 @@ static int vhost_user_write(struct vhost_dev *dev,
VhostUserMsg *msg,
return ret < 0 ? -saved_errno : -EIO;
}
+ trace_vhost_user_write(msg->hdr.request, msg->hdr.flags);
+
return 0;
}
@@ -542,6 +544,8 @@ static int vhost_user_set_log_base(struct vhost_dev *dev,
uint64_t base,
}
}
+ trace_vhost_user_read(msg.hdr.request, msg.hdr.flags);
+
return 0;
}
diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events
index 7a6576d833..65e3b704ec 100644
--- a/hw/virtio/trace-events
+++ b/hw/virtio/trace-events
@@ -21,6 +21,8 @@ vhost_user_set_mem_table_withfd(int index, const char *name,
uint64_t memory_siz
vhost_user_postcopy_waker(const char *rb, uint64_t rb_offset) "%s + 0x%"PRIx64
vhost_user_postcopy_waker_found(uint64_t client_addr) "0x%"PRIx64
vhost_user_postcopy_waker_nomatch(const char *rb, uint64_t rb_offset) "%s +
0x%"PRIx64
+vhost_user_read(uint32_t req, uint32_t flags) "req:%d flags:0x%"PRIx32""
+vhost_user_write(uint32_t req, uint32_t flags) "req:%d flags:0x%"PRIx32""
# vhost-vdpa.c
vhost_vdpa_dma_map(void *vdpa, int fd, uint32_t msg_type, uint64_t iova,
uint64_t size, uint64_t uaddr, uint8_t perm, uint8_t type) "vdpa:%p fd: %d
msg_type: %"PRIu32" iova: 0x%"PRIx64" size: 0x%"PRIx64" uaddr: 0x%"PRIx64"
perm: 0x%"PRIx8" type: %"PRIu8
--
MST
- [PULL 46/91] vdpa: Fix index calculus at vhost_vdpa_svqs_start, (continued)
- [PULL 46/91] vdpa: Fix index calculus at vhost_vdpa_svqs_start, Michael S. Tsirkin, 2022/05/16
- [PULL 49/91] target/i386: Fix sanity check on max APIC ID / X2APIC enablement, Michael S. Tsirkin, 2022/05/16
- [PULL 50/91] intel_iommu: Support IR-only mode without DMA translation, Michael S. Tsirkin, 2022/05/16
- [PULL 51/91] intel_iommu: Only allow interrupt remapping to be enabled if it's supported, Michael S. Tsirkin, 2022/05/16
- [PULL 52/91] intel_iommu: Fix irqchip / X2APIC configuration checks, Michael S. Tsirkin, 2022/05/16
- [PULL 53/91] intel-iommu: remove VTD_FR_RESERVED_ERR, Michael S. Tsirkin, 2022/05/16
- [PULL 54/91] intel-iommu: block output address in interrupt address range, Michael S. Tsirkin, 2022/05/16
- [PULL 55/91] intel-iommu: update root_scalable before switching as during post_load, Michael S. Tsirkin, 2022/05/16
- [PULL 56/91] intel-iommu: update iq_dw during post load, Michael S. Tsirkin, 2022/05/16
- [PULL 57/91] vhost_net: Print feature masks in hex, Michael S. Tsirkin, 2022/05/16
- [PULL 60/91] hw/virtio: add vhost_user_[read|write] trace points,
Michael S. Tsirkin <=
- [PULL 58/91] hw/virtio: move virtio-pci.h into shared include space, Michael S. Tsirkin, 2022/05/16
- [PULL 62/91] docs: vhost-user: rewrite section on ring state machine, Michael S. Tsirkin, 2022/05/16
- [PULL 63/91] docs: vhost-user: replace master/slave with front-end/back-end, Michael S. Tsirkin, 2022/05/16
- [PULL 59/91] virtio-pci: add notification trace points, Michael S. Tsirkin, 2022/05/16
- [PULL 61/91] docs: vhost-user: clean up request/reply description, Michael S. Tsirkin, 2022/05/16
- [PULL 64/91] vhost-user.rst: add clarifying language about protocol negotiation, Michael S. Tsirkin, 2022/05/16
- [PULL 65/91] libvhost-user: expose vu_request_to_string, Michael S. Tsirkin, 2022/05/16
- [PULL 66/91] docs/devel: start documenting writing VirtIO devices, Michael S. Tsirkin, 2022/05/16
- [PULL 67/91] include/hw: start documenting the vhost API, Michael S. Tsirkin, 2022/05/16
- [PULL 68/91] hw/virtio/vhost-user: don't suppress F_CONFIG when supported, Michael S. Tsirkin, 2022/05/16