Skip to content

Commit 76f4085

Browse files
Xianting Tianmstsirkin
authored andcommitted
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 <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 2855c2a commit 76f4085

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/vhost/vhost.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2515,7 +2515,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq,
25152515
vq->avail_idx = vhost16_to_cpu(vq, avail_idx);
25162516

25172517
if (unlikely((u16)(vq->avail_idx - last_avail_idx) > vq->num)) {
2518-
vq_err(vq, "Guest moved used index from %u to %u",
2518+
vq_err(vq, "Guest moved avail index from %u to %u",
25192519
last_avail_idx, vq->avail_idx);
25202520
return -EFAULT;
25212521
}

0 commit comments

Comments
 (0)