From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ymjs1-0004eM-Cs for qemu-devel@nongnu.org; Mon, 27 Apr 2015 10:18:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ymjs0-0004mJ-Lg for qemu-devel@nongnu.org; Mon, 27 Apr 2015 10:18:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ymjs0-0004lU-Dd for qemu-devel@nongnu.org; Mon, 27 Apr 2015 10:18:48 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3REIl58007193 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 27 Apr 2015 10:18:48 -0400 Message-ID: <553E4543.9080700@redhat.com> Date: Mon, 27 Apr 2015 16:18:43 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1430137765-13771-1-git-send-email-pbonzini@redhat.com> <20150427152255-mutt-send-email-mst@redhat.com> <553E3982.2030702@redhat.com> <20150427160216-mutt-send-email-mst@redhat.com> In-Reply-To: <20150427160216-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio-scsi: fix "written length" field in the used ring List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On 27/04/2015 16:04, Michael S. Tsirkin wrote: >> > Because virtio-blk uses a response footer and virtio-scsi uses a >> > response header, fixing virtio-blk is much harder. You need to add a >> > new argument to virtqueue_push. I'd really prefer someone else to do it... >> > >> > Paolo > OK but what's the desired API? > Do you know the host length or might any part of iov > be dirty? For a 1-sector request and a 2048+1 bytes iov, I know that I've written bytes 0-511 and byte 2048. So I have to dirty all 2049 bytes, but the written length should be 512. Right now we pass 2049 to virtqueue_push and write 2049 to the written length, I'd need another argument to pass the 512. Paolo