hw/virtio/virtio-mmio: Make QueueNumMax read 0 for unavailable queues
commitf7b803b377f74f7e109559e8e64f04c4c1fcd86b
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 26 Jul 2013 15:41:28 +0000 (26 16:41 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 12 Aug 2013 10:57:56 +0000 (12 11:57 +0100)
tree600434f1e4f9cfa8af4d0595a3d35454225a476e
parentf6049f4483d61fa911a0693c2c48ce8308451d33
hw/virtio/virtio-mmio: Make QueueNumMax read 0 for unavailable queues

The virtio-mmio spec says that QueueNumMax must read zero for queues
which are unavailable; implement this, rather than always returning
VIRTQUEUE_MAX_SIZE.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1374853288-9912-3-git-send-email-peter.maydell@linaro.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-mmio.c