qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Kevin Wolf <kwolf@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	Nicholas Bellinger <nab@linux-iscsi.org>,
	Paul Brook <paul@codesourcery.com>,
	Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>
Subject: [Qemu-devel] [PATCH 0/2] Setup scsi-bus xfer and xfer_mode for PR IN/OUT and Maintenance IN/OUT
Date: Sun, 30 May 2010 18:42:53 -0700	[thread overview]
Message-ID: <1275270173-10973-1-git-send-email-nab@linux-iscsi.org> (raw)

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

             reply	other threads:[~2010-05-31  1:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31  1:42 Nicholas A. Bellinger [this message]
2010-05-31  9:55 ` [Qemu-devel] Re: [PATCH 0/2] Setup scsi-bus xfer and xfer_mode for PR IN/OUT and Maintenance IN/OUT Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1275270173-10973-1-git-send-email-nab@linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).