summaryrefslogtreecommitdiff
path: root/drivers/vhost
diff options
context:
space:
mode:
authorXianting Tian <xianting.tian@linux.alibaba.com>2024-03-11 11:21:09 +0300
committerMichael S. Tsirkin <mst@redhat.com>2024-04-08 11:11:04 +0300
commit76f408535aab39c33e0a1dcada9fba5631c65595 (patch)
tree8df4b0c7c5647b5c69a9162ff0607565160c584e /drivers/vhost
parent2855c2a7820bc8198ae937a9a67dbdc3990e9d2c (diff)
downloadlinux-76f408535aab39c33e0a1dcada9fba5631c65595.tar.xz
vhost: correct misleading printing information
Guest moved avail idx not used idx when we need to print log if '(vq->avail_idx - last_avail_idx) > vq->num', so fix it. Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com> Message-Id: <20240311082109.46773-1-xianting.tian@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/vhost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 32686c79c41d..8995730ce0bf 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -2515,7 +2515,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq,
vq->avail_idx = vhost16_to_cpu(vq, avail_idx);
if (unlikely((u16)(vq->avail_idx - last_avail_idx) > vq->num)) {
- vq_err(vq, "Guest moved used index from %u to %u",
+ vq_err(vq, "Guest moved avail index from %u to %u",
last_avail_idx, vq->avail_idx);
return -EFAULT;
}