From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2azb-00040q-48 for qemu-devel@nongnu.org; Fri, 04 Nov 2016 05:40:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2azX-0000eD-IL for qemu-devel@nongnu.org; Fri, 04 Nov 2016 05:40:58 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51915) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2azX-0000cu-3G for qemu-devel@nongnu.org; Fri, 04 Nov 2016 05:40:55 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uA49cZB6146131 for ; Fri, 4 Nov 2016 05:40:53 -0400 Received: from e06smtp09.uk.ibm.com (e06smtp09.uk.ibm.com [195.75.94.105]) by mx0a-001b2d01.pphosted.com with ESMTP id 26gqfth7d4-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 04 Nov 2016 05:40:53 -0400 Received: from localhost by e06smtp09.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 4 Nov 2016 09:40:50 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 201DA17D805D for ; Fri, 4 Nov 2016 09:43:06 +0000 (GMT) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uA49elRw27197680 for ; Fri, 4 Nov 2016 09:40:47 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uA49ekZu030560 for ; Fri, 4 Nov 2016 03:40:47 -0600 Date: Fri, 4 Nov 2016 10:40:44 +0100 From: Cornelia Huck In-Reply-To: <147824876249.27553.6482791862079905682.stgit@bahia> References: <147824874772.27553.11117306757523688100.stgit@bahia> <147824876249.27553.6482791862079905682.stgit@bahia> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20161104104044.63723223.cornelia.huck@de.ibm.com> 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: Greg Kurz Cc: qemu-devel@nongnu.org, Pierre Morel , "Michael S. Tsirkin" 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. > 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