qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] Setup scsi-bus xfer and xfer_mode for PR IN/OUT and Maintenance IN/OUT
@ 2010-05-31  1:42 Nicholas A. Bellinger
  2010-05-31  9:55 ` [Qemu-devel] " Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas A. Bellinger @ 2010-05-31  1:42 UTC (permalink / raw)
  To: Kevin Wolf, Gerd Hoffmann
  Cc: kvm-devel, qemu-devel, Nicholas Bellinger, Paul Brook,
	Christoph Hellwig, Hannes Reinecke

From: Nicholas Bellinger <nab@linux-iscsi.org>

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(-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-31  9:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-31  1:42 [Qemu-devel] [PATCH 0/2] Setup scsi-bus xfer and xfer_mode for PR IN/OUT and Maintenance IN/OUT Nicholas A. Bellinger
2010-05-31  9:55 ` [Qemu-devel] " Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).