From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58827 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJ1ie-0006Eo-6l for qemu-devel@nongnu.org; Mon, 31 May 2010 05:55:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJ1ic-0001aC-Rw for qemu-devel@nongnu.org; Mon, 31 May 2010 05:55:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9472) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJ1ic-0001a6-K4 for qemu-devel@nongnu.org; Mon, 31 May 2010 05:55:38 -0400 Message-ID: <4C03878A.8080805@redhat.com> Date: Mon, 31 May 2010 11:55:22 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1275270173-10973-1-git-send-email-nab@linux-iscsi.org> In-Reply-To: <1275270173-10973-1-git-send-email-nab@linux-iscsi.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [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: "Nicholas A. Bellinger" Cc: Kevin Wolf , kvm-devel , qemu-devel , Paul Brook , Christoph Hellwig , Hannes Reinecke On 05/31/10 03:42, Nicholas A. Bellinger wrote: > 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. ;) Patches look fine to me. Acked-by: Gerd Hoffmann cheers, Gerd