summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Bennée2022-07-28 15:55:03 +0200
committerMichael S. Tsirkin2022-08-17 13:07:37 +0200
commit643a943554041a10f372a33a5ce7c9ef51007a74 (patch)
tree83475442d92bac8d5572268c3a2d1a15b95d7479
parenthw/virtio: handle un-configured shutdown in virtio-pci (diff)
downloadqemu-643a943554041a10f372a33a5ce7c9ef51007a74.tar.gz
qemu-643a943554041a10f372a33a5ce7c9ef51007a74.tar.xz
qemu-643a943554041a10f372a33a5ce7c9ef51007a74.zip
hw/virtio: fix vhost_user_read tracepoint
As reads happen in the callback we were never seeing them. We only really care about the header so move the tracepoint to when the header is complete. Fixes: 6ca6d8ee9d (hw/virtio: add vhost_user_[read|write] trace points) Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20220728135503.1060062-5-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--hw/virtio/vhost-user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 75b8df21a4..bd24741be8 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -295,6 +295,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);
+
return 0;
}
@@ -544,8 +546,6 @@ 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;
}