'head' is an index of VirtQueueElement, it should less than vring.num Signed-off-by: Amos Kong <akong@xxxxxxxxxx> --- hw/virtio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 6e8814c..a3d0eee 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -271,7 +271,7 @@ static unsigned int virtqueue_get_head(VirtQueue *vq, unsigned int idx) /* If their number is silly, that's a fatal mistake. */ if (head >= vq->vring.num) { - error_report("Guest says index %u is available", head); + error_report("Guest says index %u is unavailable", head); exit(1); } -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html