public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] virtio: Correct error message of unavailable index
@ 2011-06-15 14:25 Amos Kong
  2011-06-15 14:25 ` [PATCH 2/3] virtio: Strictly check queue_size when adding virtqueue Amos Kong
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Amos Kong @ 2011-06-15 14:25 UTC (permalink / raw)
  To: mst; +Cc: kvm

'head' is an index of VirtQueueElement, it should less than vring.num

Signed-off-by: Amos Kong <akong@redhat.com>
---
 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);
     }
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-06-16  2:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15 14:25 [PATCH 1/3] virtio: Correct error message of unavailable index Amos Kong
2011-06-15 14:25 ` [PATCH 2/3] virtio: Strictly check queue_size when adding virtqueue Amos Kong
2011-06-15 20:36   ` Michael S. Tsirkin
2011-06-15 22:53     ` Amos Kong
2011-06-15 23:31       ` [Qemu-devel] " Anthony Liguori
2011-06-16  2:10         ` [PATCH v2] virtio: Define queue_size to unsigned Amos Kong
2011-06-15 14:25 ` [PATCH 3/3] virtio: Define max_nr_ports " Amos Kong
2011-06-15 20:39   ` Michael S. Tsirkin
2011-06-15 20:30 ` [PATCH 1/3] virtio: Correct error message of unavailable index Michael S. Tsirkin
2011-06-16  1:59   ` Amos Kong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox