From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2bBj-0004z3-JO for qemu-devel@nongnu.org; Fri, 04 Nov 2016 05:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2bBe-00063u-KM for qemu-devel@nongnu.org; Fri, 04 Nov 2016 05:53:31 -0400 Received: from 5.mo5.mail-out.ovh.net ([87.98.173.103]:53731) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2bBe-00062a-E2 for qemu-devel@nongnu.org; Fri, 04 Nov 2016 05:53:26 -0400 Received: from player774.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo5.mail-out.ovh.net (Postfix) with ESMTP id F1F79428ED for ; Fri, 4 Nov 2016 10:53:24 +0100 (CET) Date: Fri, 4 Nov 2016 10:53:20 +0100 From: Greg Kurz Message-ID: <20161104105320.7930cb60@bahia> In-Reply-To: <20161104104044.63723223.cornelia.huck@de.ibm.com> References: <147824874772.27553.11117306757523688100.stgit@bahia> <147824876249.27553.6482791862079905682.stgit@bahia> <20161104104044.63723223.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] vhost: drop legacy vring layout bits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: qemu-devel@nongnu.org, Pierre Morel , "Michael S. Tsirkin" On Fri, 4 Nov 2016 10:40:44 +0100 Cornelia Huck wrote: > On Fri, 04 Nov 2016 09:39:22 +0100 > Greg Kurz wrote: > > > The legacy vring layout is not used anymore. > > "as we use separate mappings even for legacy devices." ? > > Otherwise, this may confuse the casual reader into thinking legacy is > not supported anymore. > Yeah you're right. I'll add this too. > > This patch simply removes it. > > > > This also fixes a bug with virtio 1 devices when the vring descriptor table > > is mapped at a higher address than the used vring because the following > > function may return an insanely great value: > > > > hwaddr virtio_queue_get_ring_size(VirtIODevice *vdev, int n) > > { > > return vdev->vq[n].vring.used - vdev->vq[n].vring.desc + > > virtio_queue_get_used_size(vdev, n); > > } > > > > and the mapping fails. > > > > Signed-off-by: Greg Kurz > > --- > > hw/virtio/vhost.c | 13 ------------- > > include/hw/virtio/vhost.h | 3 --- > > 2 files changed, 16 deletions(-) > > Reviewed-by: Cornelia Huck >