From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46823 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIu1Z-0004ht-Up for qemu-devel@nongnu.org; Sun, 30 May 2010 21:42:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIu1Y-0000jm-76 for qemu-devel@nongnu.org; Sun, 30 May 2010 21:42:41 -0400 Received: from smtp107.sbc.mail.gq1.yahoo.com ([67.195.14.110]:47425) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OIu1X-0000jY-TP for qemu-devel@nongnu.org; Sun, 30 May 2010 21:42:40 -0400 From: "Nicholas A. Bellinger" Date: Sun, 30 May 2010 18:42:53 -0700 Message-Id: <1275270173-10973-1-git-send-email-nab@linux-iscsi.org> Subject: [Qemu-devel] [PATCH 0/2] Setup scsi-bus xfer and xfer_mode for PR IN/OUT and Maintenance IN/OUT List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Gerd Hoffmann Cc: kvm-devel , qemu-devel , Nicholas Bellinger , Paul Brook , Christoph Hellwig , Hannes Reinecke From: Nicholas Bellinger Greetings Gerd, Kevin and Co, Attached are two patches to add the necesary CDB parsing to determine SCSIRequest->cmd.xfer (length) and SCSIRequest->cmd.mode (direction) for Persistent Reservation IN/OUT CDBs and for Maintenance IN/OUT CDBs used for Asymmetric Logical Unit Access, et al. There is a special case for the latter Maintenance CDBs with TYPE_ROM that has been included in scsi_req_length(). Also, I should mention this is a temporary measure in order to ensure that we can actually do passthrough of these CDBs into KVM Guest for lsi and megaraid HBA emulation. What will need to eventually happen is to get rid of scsi_req_xfer_mode() all together and just setup SCSIRequest->cmd.mode based on CDB type in scsi_req_length(), instead of having to have another switch(cdb[0]) statement for every SCSI WRITE CDB on the planet to set SCSI_XFER_TO_DEV. Anyways, I will look at doing this conversion in scsi_req_length() at some point, but please apply these for the moment so folks can get access to their SPC-4 Port LUNs with QEMU. ;) Best, --nab Nicholas Bellinger (2): [scsi-bus]: Add PR-OUT and PR-IN case for SCSIRequest xfer and xfer_mode setup [scsi-bus]: Add MAINTENANCE_IN and MAINTENANCE_OUT case for SCSIRequest xfer and xfer_mode setup hw/scsi-bus.c | 19 +++++++++++++++++++ hw/scsi-defs.h | 2 ++ 2 files changed, 21 insertions(+), 0 deletions(-)