From: Raphael Norwitz <raphael.s.norwitz@gmail.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: mst@redhat.com, peterx@redhat.com, farosas@suse.de,
raphael@enfabrica.net, sgarzare@redhat.com,
marcandre.lureau@redhat.com, pbonzini@redhat.com,
kwolf@redhat.com, hreitz@redhat.com, berrange@redhat.com,
eblake@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org,
qemu-block@nongnu.org, steven.sistare@oracle.com,
den-plotnikov@yandex-team.ru
Subject: Re: [PATCH 21/33] vhost-user: make trace events more readable
Date: Thu, 9 Oct 2025 15:07:38 -0400 [thread overview]
Message-ID: <CAFubqFsVsPnKvm8VR==zUmn1j6cq4TnKHaVKWpiG6pr6gbGW4A@mail.gmail.com> (raw)
In-Reply-To: <20250813164856.950363-22-vsementsov@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.s.norwitz@gmail.com>
On Wed, Aug 13, 2025 at 12:57 PM Vladimir Sementsov-Ogievskiy
<vsementsov@yandex-team.ru> wrote:
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> hw/virtio/trace-events | 4 +-
> hw/virtio/vhost-user.c | 94 +++++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 94 insertions(+), 4 deletions(-)
>
> diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events
> index 76f0d458b2..e5142c27f9 100644
> --- a/hw/virtio/trace-events
> +++ b/hw/virtio/trace-events
> @@ -25,8 +25,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_user_read(uint32_t req, const char *req_name, uint32_t flags) "req:%d (%s) flags:0x%"PRIx32""
> +vhost_user_write(uint32_t req, const char *req_name, uint32_t flags) "req:%d (%s) flags:0x%"PRIx32""
> vhost_user_create_notifier(int idx, void *n) "idx:%d n:%p"
>
> # vhost-vdpa.c
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index fe9d91348d..3979582975 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -119,6 +119,94 @@ typedef enum VhostUserBackendRequest {
> VHOST_USER_BACKEND_MAX
> } VhostUserBackendRequest;
>
> +static const char *vhost_req_name(VhostUserRequest req)
> +{
> + switch (req) {
> + case VHOST_USER_NONE:
> + return "NONE";
> + case VHOST_USER_GET_FEATURES:
> + return "GET_FEATURES";
> + case VHOST_USER_SET_FEATURES:
> + return "SET_FEATURES";
> + case VHOST_USER_SET_OWNER:
> + return "SET_OWNER";
> + case VHOST_USER_RESET_OWNER:
> + return "RESET_OWNER";
> + case VHOST_USER_SET_MEM_TABLE:
> + return "SET_MEM_TABLE";
> + case VHOST_USER_SET_LOG_BASE:
> + return "SET_LOG_BASE";
> + case VHOST_USER_SET_LOG_FD:
> + return "SET_LOG_FD";
> + case VHOST_USER_SET_VRING_NUM:
> + return "SET_VRING_NUM";
> + case VHOST_USER_SET_VRING_ADDR:
> + return "SET_VRING_ADDR";
> + case VHOST_USER_SET_VRING_BASE:
> + return "SET_VRING_BASE";
> + case VHOST_USER_GET_VRING_BASE:
> + return "GET_VRING_BASE";
> + case VHOST_USER_SET_VRING_KICK:
> + return "SET_VRING_KICK";
> + case VHOST_USER_SET_VRING_CALL:
> + return "SET_VRING_CALL";
> + case VHOST_USER_SET_VRING_ERR:
> + return "SET_VRING_ERR";
> + case VHOST_USER_GET_PROTOCOL_FEATURES:
> + return "GET_PROTOCOL_FEATURES";
> + case VHOST_USER_SET_PROTOCOL_FEATURES:
> + return "SET_PROTOCOL_FEATURES";
> + case VHOST_USER_GET_QUEUE_NUM:
> + return "GET_QUEUE_NUM";
> + case VHOST_USER_SET_VRING_ENABLE:
> + return "SET_VRING_ENABLE";
> + case VHOST_USER_SEND_RARP:
> + return "SEND_RARP";
> + case VHOST_USER_NET_SET_MTU:
> + return "NET_SET_MTU";
> + case VHOST_USER_SET_BACKEND_REQ_FD:
> + return "SET_BACKEND_REQ_FD";
> + case VHOST_USER_IOTLB_MSG:
> + return "IOTLB_MSG";
> + case VHOST_USER_SET_VRING_ENDIAN:
> + return "SET_VRING_ENDIAN";
> + case VHOST_USER_GET_CONFIG:
> + return "GET_CONFIG";
> + case VHOST_USER_SET_CONFIG:
> + return "SET_CONFIG";
> + case VHOST_USER_CREATE_CRYPTO_SESSION:
> + return "CREATE_CRYPTO_SESSION";
> + case VHOST_USER_CLOSE_CRYPTO_SESSION:
> + return "CLOSE_CRYPTO_SESSION";
> + case VHOST_USER_POSTCOPY_ADVISE:
> + return "POSTCOPY_ADVISE";
> + case VHOST_USER_POSTCOPY_LISTEN:
> + return "POSTCOPY_LISTEN";
> + case VHOST_USER_POSTCOPY_END:
> + return "POSTCOPY_END";
> + case VHOST_USER_GET_INFLIGHT_FD:
> + return "GET_INFLIGHT_FD";
> + case VHOST_USER_SET_INFLIGHT_FD:
> + return "SET_INFLIGHT_FD";
> + case VHOST_USER_GPU_SET_SOCKET:
> + return "GPU_SET_SOCKET";
> + case VHOST_USER_RESET_DEVICE:
> + return "RESET_DEVICE";
> + case VHOST_USER_GET_MAX_MEM_SLOTS:
> + return "GET_MAX_MEM_SLOTS";
> + case VHOST_USER_ADD_MEM_REG:
> + return "ADD_MEM_REG";
> + case VHOST_USER_REM_MEM_REG:
> + return "REM_MEM_REG";
> + case VHOST_USER_SET_STATUS:
> + return "SET_STATUS";
> + case VHOST_USER_GET_STATUS:
> + return "GET_STATUS";
> + default:
> + return "<unknown>";
> + }
> +}
> +
> typedef struct VhostUserMemoryRegion {
> uint64_t guest_phys_addr;
> uint64_t memory_size;
> @@ -310,7 +398,8 @@ static int vhost_user_read_header(struct vhost_dev *dev, VhostUserMsg *msg)
> return -EPROTO;
> }
>
> - trace_vhost_user_read(msg->hdr.request, msg->hdr.flags);
> + trace_vhost_user_read(msg->hdr.request,
> + vhost_req_name(msg->hdr.request), msg->hdr.flags);
>
> return 0;
> }
> @@ -430,7 +519,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);
> + trace_vhost_user_write(msg->hdr.request,
> + vhost_req_name(msg->hdr.request), msg->hdr.flags);
>
> return 0;
> }
> --
> 2.48.1
>
>
next prev parent reply other threads:[~2025-10-09 19:08 UTC|newest]
Thread overview: 108+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 16:48 [PATCH 00/33] vhost-user-blk: live-backend local migration Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 01/33] vhost: introduce vhost_ops->vhost_set_vring_enable_supported method Vladimir Sementsov-Ogievskiy
2025-10-09 18:56 ` Raphael Norwitz
2025-10-09 19:25 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 02/33] vhost: drop backend_features field Vladimir Sementsov-Ogievskiy
2025-09-12 14:39 ` Markus Armbruster
2025-10-09 18:57 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 03/33] vhost-user: introduce vhost_user_has_prot() helper Vladimir Sementsov-Ogievskiy
2025-10-09 18:57 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 04/33] vhost: move protocol_features to vhost_user Vladimir Sementsov-Ogievskiy
2025-10-09 18:57 ` Raphael Norwitz
2025-10-09 19:35 ` Vladimir Sementsov-Ogievskiy
2025-10-09 19:45 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 05/33] vhost-user-gpu: drop code duplication Vladimir Sementsov-Ogievskiy
2025-08-18 6:54 ` Philippe Mathieu-Daudé
2025-10-09 18:58 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 06/33] vhost: make vhost_dev.features private Vladimir Sementsov-Ogievskiy
2025-10-09 18:58 ` Raphael Norwitz
2025-10-09 19:40 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 07/33] virtio: move common part of _set_guest_notifier to generic code Vladimir Sementsov-Ogievskiy
2025-08-14 4:53 ` Philippe Mathieu-Daudé
2025-08-14 11:15 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 08/33] virtio: drop *_set_guest_notifier_fd_handler() helpers Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 09/33] vhost-user: keep QIOChannelSocket for backend channel Vladimir Sementsov-Ogievskiy
2025-10-09 18:58 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 10/33] vhost: vhost_virtqueue_start(): fix failure path Vladimir Sementsov-Ogievskiy
2025-10-09 19:00 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 11/33] vhost: make vhost_memory_unmap() null-safe Vladimir Sementsov-Ogievskiy
2025-10-09 19:00 ` Raphael Norwitz
2025-10-09 20:00 ` Vladimir Sementsov-Ogievskiy
2025-10-11 19:10 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 12/33] vhost: simplify calls to vhost_memory_unmap() Vladimir Sementsov-Ogievskiy
2025-10-09 19:00 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 13/33] vhost: move vrings mapping to the top of vhost_virtqueue_start() Vladimir Sementsov-Ogievskiy
2025-10-09 19:01 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 14/33] vhost: vhost_virtqueue_start(): drop extra local variables Vladimir Sementsov-Ogievskiy
2025-10-09 19:02 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 15/33] vhost: final refactoring of vhost vrings map/unmap Vladimir Sementsov-Ogievskiy
2025-10-09 19:02 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 16/33] vhost: simplify vhost_dev_init() error-path Vladimir Sementsov-Ogievskiy
2025-10-09 19:04 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 17/33] vhost: move busyloop timeout initialization to vhost_virtqueue_init() Vladimir Sementsov-Ogievskiy
2025-10-09 19:04 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 18/33] vhost: introduce check_memslots() helper Vladimir Sementsov-Ogievskiy
2025-10-09 19:06 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 19/33] vhost: vhost_dev_init(): drop extra features variable Vladimir Sementsov-Ogievskiy
2025-10-09 19:06 ` Raphael Norwitz
2025-10-09 20:15 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 20/33] hw/virtio/virtio-bus: refactor virtio_bus_set_host_notifier() Vladimir Sementsov-Ogievskiy
2025-08-14 6:00 ` Philippe Mathieu-Daudé
2025-10-09 19:07 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 21/33] vhost-user: make trace events more readable Vladimir Sementsov-Ogievskiy
2025-08-14 5:59 ` Philippe Mathieu-Daudé
2025-10-09 19:07 ` Raphael Norwitz [this message]
2025-08-13 16:48 ` [PATCH 22/33] vhost-user-blk: add some useful trace-points Vladimir Sementsov-Ogievskiy
2025-08-14 4:58 ` Philippe Mathieu-Daudé
2025-08-14 11:14 ` Vladimir Sementsov-Ogievskiy
2025-10-09 19:07 ` Raphael Norwitz
2025-10-09 20:19 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 23/33] vhost: " Vladimir Sementsov-Ogievskiy
2025-10-09 19:08 ` Raphael Norwitz
2025-10-09 20:20 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 24/33] chardev-add: support local migration Vladimir Sementsov-Ogievskiy
2025-09-12 14:56 ` Markus Armbruster
2025-09-12 15:04 ` Vladimir Sementsov-Ogievskiy
2025-09-12 15:24 ` Steven Sistare
2025-09-15 13:28 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 25/33] virtio: introduce .skip_vhost_migration_log() handler Vladimir Sementsov-Ogievskiy
2025-10-09 19:08 ` Raphael Norwitz
2025-08-13 16:48 ` [PATCH 26/33] io/channel-socket: introduce qio_channel_socket_keep_nonblock() Vladimir Sementsov-Ogievskiy
2025-08-20 13:27 ` Peter Xu
2025-08-20 13:43 ` Daniel P. Berrangé
2025-08-20 14:37 ` Peter Xu
2025-08-20 14:42 ` Daniel P. Berrangé
2025-08-21 12:07 ` Vladimir Sementsov-Ogievskiy
2025-08-21 13:45 ` Peter Xu
2025-08-21 14:11 ` Daniel P. Berrangé
2025-08-20 13:37 ` Daniel P. Berrangé
2025-08-21 12:08 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 27/33] migration/socket: keep fds non-block Vladimir Sementsov-Ogievskiy
2025-08-20 13:30 ` Peter Xu
2025-08-21 12:15 ` Vladimir Sementsov-Ogievskiy
2025-08-21 13:49 ` Peter Xu
2025-08-13 16:48 ` [PATCH 28/33] vhost: introduce backend migration Vladimir Sementsov-Ogievskiy
2025-10-09 19:09 ` Raphael Norwitz
2025-10-09 20:51 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 29/33] vhost-user: support " Vladimir Sementsov-Ogievskiy
2025-10-09 19:09 ` Raphael Norwitz
2025-10-09 20:54 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 30/33] virtio: support vhost " Vladimir Sementsov-Ogievskiy
2025-10-09 19:09 ` Raphael Norwitz
2025-10-09 20:59 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 31/33] vhost-user-blk: " Vladimir Sementsov-Ogievskiy
2025-10-09 19:09 ` Raphael Norwitz
2025-10-09 21:14 ` Vladimir Sementsov-Ogievskiy
2025-10-09 23:43 ` Raphael Norwitz
2025-10-10 6:27 ` Vladimir Sementsov-Ogievskiy
2025-10-13 21:50 ` Raphael Norwitz
2025-10-14 11:59 ` Vladimir Sementsov-Ogievskiy
2025-08-13 16:48 ` [PATCH 32/33] test/functional: exec_command_and_wait_for_pattern: add vm arg Vladimir Sementsov-Ogievskiy
2025-08-14 5:01 ` Philippe Mathieu-Daudé
2025-08-18 6:55 ` Thomas Huth
2025-08-13 16:48 ` [PATCH 33/33] tests/functional: add test_x86_64_vhost_user_blk_fd_migration.py Vladimir Sementsov-Ogievskiy
2025-10-09 19:16 ` [PATCH 00/33] vhost-user-blk: live-backend local migration Raphael Norwitz
2025-10-09 22:43 ` Vladimir Sementsov-Ogievskiy
2025-10-09 23:28 ` Raphael Norwitz
2025-10-10 8:47 ` Vladimir Sementsov-Ogievskiy
2025-10-13 21:41 ` Raphael Norwitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFubqFsVsPnKvm8VR==zUmn1j6cq4TnKHaVKWpiG6pr6gbGW4A@mail.gmail.com' \
--to=raphael.s.norwitz@gmail.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=den-plotnikov@yandex-team.ru \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=raphael@enfabrica.net \
--cc=sgarzare@redhat.com \
--cc=steven.sistare@oracle.com \
--cc=vsementsov@yandex-team.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).