[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH-v2 0/3] virtio/vhost: Add checks for uninitializ
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH-v2 0/3] virtio/vhost: Add checks for uninitialized VQs |
Date: |
Tue, 2 Apr 2013 15:01:45 +0300 |
On Mon, Apr 01, 2013 at 11:58:21PM +0000, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <address@hidden>
>
> Hi folks,
>
> This series adds a virtio_queue_valid() for use by virtio-pci code in
> order to prevent opreations upon uninitialized VQs, which is currently
> expected to occur during seabios setup of virtio-scsi with in-flight
> vhost-scsi-pci device code.
>
> On the vhost side, it also adds virtio_queue_valid() sanity checks in
> vhost_virtqueue_[start,stop]() and vhost_verify_ring_mappings() in order
> to skip the same uninitialized VQs.
>
> Changes from v1:
> - Remove now unnecessary virtio_queue_get_num() calls in virtio-pci.c
> - Add virtio_queue_valid() calls in vhost_virtqueue_[start,stop]()
>
> Please review.
>
> --nab
Looks reasonable.
Acked-by: Michael S. Tsirkin <address@hidden>
So - does this fix the issues you saw with vhost-scsi?
> Michael S. Tsirkin (1):
> virtio: add API to check that ring is setup
>
> Nicholas Bellinger (2):
> virtio-pci: Add virtio_queue_valid checks ahead of
> virtio_queue_get_num
> vhost: Skip uninitialized VQs in vhost_virtqueue_[start,stop]
>
> hw/vhost.c | 12 ++++++++++++
> hw/virtio-pci.c | 34 +++++++++++++++-------------------
> hw/virtio.c | 5 +++++
> hw/virtio.h | 1 +
> 4 files changed, 33 insertions(+), 19 deletions(-)
>
> --
> 1.7.2.5