From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xvsk2-0007W1-No for qemu-devel@nongnu.org; Tue, 02 Dec 2014 14:04:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xvsjr-0000qW-76 for qemu-devel@nongnu.org; Tue, 02 Dec 2014 14:04:06 -0500 Received: from mail.kernel.org ([198.145.19.201]:53570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xvsjr-0000q6-1Z for qemu-devel@nongnu.org; Tue, 02 Dec 2014 14:03:55 -0500 Date: Tue, 2 Dec 2014 21:03:45 +0200 From: "Michael S. Tsirkin" Message-ID: <20141202190345.GA5185@redhat.com> References: <1417525227-14051-1-git-send-email-cornelia.huck@de.ibm.com> <1417525227-14051-8-git-send-email-cornelia.huck@de.ibm.com> <20141202144628.GA2974@redhat.com> <20141202155444.0731c48f.cornelia.huck@de.ibm.com> <20141202164136.1a57f358.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141202164136.1a57f358.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: thuth@linux.vnet.ibm.com, rusty@rustcorp.com.au, qemu-devel@nongnu.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > { > + /* > + * For virtio-1 devices, the number of buffers may only be > + * updated if the ring addresses have not yet been set up. Where does it say that? > + */ > + if (virtio_has_feature(vdev, VIRTIO_F_VERSION_1) && > + vdev->vq[n].vring.desc) { > + error_report("tried to modify buffer num for virtio-1 device"); > + return; > + } > /* Don't allow guest to flip queue between existent and > * nonexistent states, or to set it to an invalid size. > */