From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNARt-0004yi-6U for qemu-devel@nongnu.org; Tue, 02 Apr 2013 19:17:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNARr-0003W3-AL for qemu-devel@nongnu.org; Tue, 02 Apr 2013 19:17:04 -0400 Received: from mail.linux-iscsi.org ([67.23.28.174]:48558 helo=linux-iscsi.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNARr-0003Vm-4e for qemu-devel@nongnu.org; Tue, 02 Apr 2013 19:17:03 -0400 From: "Nicholas A. Bellinger" In-Reply-To: <20130402120145.GB21545@redhat.com> References: <1364860704-11896-1-git-send-email-nab@linux-iscsi.org> <20130402120145.GB21545@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 02 Apr 2013 16:16:54 -0700 Message-ID: <1364944614.3898.202.camel@haakon2.linux-iscsi.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH-v2 0/3] virtio/vhost: Add checks for uninitialized VQs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: kvm-devel , qemu-devel , lf-virt , Anthony Liguori , target-devel , Stefan Hajnoczi , Paolo Bonzini , Asias He On Tue, 2013-04-02 at 15:01 +0300, Michael S. Tsirkin wrote: > On Mon, Apr 01, 2013 at 11:58:21PM +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > 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 > Thanks MST! Anthony, do you want to pick these up now..? Or shall I include in the next vhost-scsi-pci PATCH-v3 series..? --nab > 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 > -- > To unsubscribe from this list: send the line "unsubscribe target-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html