qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.2 v2 0/5] scsi: enable passthrough of vend


From: Fam Zheng
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
User-agent: Mutt/1.5.23 (2014-03-12)

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 <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]