From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43244 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POU9y-0005IM-IU for qemu-devel@nongnu.org; Fri, 03 Dec 2010 06:50:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POU9w-0006xc-CL for qemu-devel@nongnu.org; Fri, 03 Dec 2010 06:50:42 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:35745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POU9w-0006xV-9Q for qemu-devel@nongnu.org; Fri, 03 Dec 2010 06:50:40 -0500 Received: by qwc9 with SMTP id 9so99439qwc.4 for ; Fri, 03 Dec 2010 03:50:39 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1291374593-17448-1-git-send-email-ronniesahlberg@gmail.com> Date: Fri, 3 Dec 2010 22:50:39 +1100 Message-ID: Subject: Re: [Qemu-devel] [Patch 0/14] builtin iscsi support From: ronnie sahlberg Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Christoph Hellwig , qemu-devel@nongnu.org On Fri, Dec 3, 2010 at 10:42 PM, Stefan Hajnoczi wrote= : > On Fri, Dec 3, 2010 at 11:09 AM, =A0 wrote: >> This series of pathces adds built in iscsi support to qemu. > > Christoph asked why block/iscsi.c exists and we don't have something > like hw/iscsi-disk.c. =A0Any thoughts on "pass-through" SCSI support so > CDBs from guest SCSI can be written straight to the iSCSI LUN? =A0Could > we support this mode of operation? That is very simple to add and uses an existing api i already use for my own private sg3-utils branch. ./block.iscsi/scsi-command.c offers an api where you provide a "struct scsi_task *" structure containing some basic data and the cdb. iscsi_scsi_command_async(). which later invokes the callback with status =3D=3D SCSI_STATUS_GOOD in which case the buffer from the device contains the data or SCSI_STATUS_CHECK_CONDITON in which case that buffer contains the sense blob instead. So yes, there is already an api in the library that offers you to pass scsi cdb/dataout/datain/response to the device. Instrumenting this to be available to the virtual host as a "passthrough" scsi device should be relatively simple as a second step. > > I like block/iscsi.c because it allows any storage interface > (including virtio and ide) to talk to an iSCSI LUN. =A0So I don't think > it makes sense to throw away block/iscsi.c. =A0But the idea of a direct > iSCSI pass-through might be interesting too. That should be very easy to add once the foundation is added into qemu. I would very much like to see bus=3Dscsi make this layer a transparent passthrough layer too, just like it is today for the special case where the file specified matches "/dev/sg" ronnie sahlberg