From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.2 v2 0/5] scsi: enable passthrough of vendor-specific commands
Date: Tue, 29 Jul 2014 15:17:35 +0800 [thread overview]
Message-ID: <20140729071735.GB16854@T430.nay.redhat.com> (raw)
In-Reply-To: <1406560119-22362-1-git-send-email-pbonzini@redhat.com>
On Mon, 07/28 17:08, Paolo Bonzini wrote:
> Right now scsi-generic is parsing the CDB, in order to compute
> the expected number of bytes to be transferred. This is necessary
> if DMA is done by the HBA via scsi_req_data, but it prevents executing
> vendor-specific commands via scsi-generic because we don't know how
> to parse them.
>
> If DMA is delegated to the SCSI layer via get_sg_list, we know in
> advance how many bytes the guest will want to receive and we can pass
> the information straight from the guest to SG_IO. In this case, it is
> unnecessary to parse the CDB to get the same information. scsi-disk needs
> it to detect underruns and overruns, but scsi-generic and scsi-block can
> just ask the HBA about the transfer direction and size.
>
> This series introduces a new parse_cdb callback in both the device and
> the HBA. The latter is called by scsi_bus_parse_cdb, which devices can
> call for passthrough requests in their implementation of parse_cdb.
>
> Paolo
>
> v1->v2: use the "right" CDB size for non-vendor-specific commands,
> as some drivers and/or firmware expect that and complain
> if you pass a READ(10) command in a 16-byte CDB. Interdiff
> here.
More learning than reviewing for me, so take this with a grain of salt:
Reviewed-by: Fam Zheng <famz@redhat.com>
prev parent reply other threads:[~2014-07-29 7:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 15:08 [Qemu-devel] [PATCH for-2.2 v2 0/5] scsi: enable passthrough of vendor-specific commands Paolo Bonzini
2014-07-28 15:08 ` [Qemu-devel] [PATCH 1/5] scsi-bus: prepare scsi_req_new for introduction of parse_cdb Paolo Bonzini
2014-07-28 15:08 ` [Qemu-devel] [PATCH 2/5] scsi-bus: introduce parse_cdb in SCSIDeviceClass and SCSIBusInfo Paolo Bonzini
2014-07-28 15:08 ` [Qemu-devel] [PATCH 3/5] scsi-block: extract scsi_block_is_passthrough Paolo Bonzini
2014-07-29 6:28 ` Fam Zheng
2014-07-29 7:45 ` Paolo Bonzini
2014-07-28 15:08 ` [Qemu-devel] [PATCH 4/5] scsi-block, scsi-generic: implement parse_cdb Paolo Bonzini
2014-07-28 15:08 ` [Qemu-devel] [PATCH 5/5] virtio-scsi: " Paolo Bonzini
2014-07-29 7:17 ` Fam Zheng [this message]
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=20140729071735.GB16854@T430.nay.redhat.com \
--to=famz@redhat.com \
--cc=pbonzini@redhat.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).