virtio-comment

 View Only
  • 1.  Block Device: Legacy SCSI 'cmd' Framing Requirements

    Posted 02-24-2019 12:31
    Regarding Version 1.1 draft 01

    When using Block-device, legacy scsi commands, while VIRTIO_F_ANY_LAYOUT is negotiated, it is not clear if 'cmd' field must reside in a single, separate device-readable buffer.
    In Section 5.2.6.3 it is written, in general (without reference to VIRTIO_F_ANY_LAYOUT) that 'cmd' field must reside in a single buffer.
    Section 5.2.6.4, 2nd bullet describes framing requirements for SCSI commands, but does not refer to 'cmd' field.

    I suggest adding description of 'cmd' field framing requirement in this bullet, as well.



    Excerpts:

    Section 5.2.6.3 (Legacy Interface: Device Operation):
    "The cmd field is only present for scsi packet command requests, and indicates the command to perform.
    This field MUST reside in a single, separate device-readable buffer;"

    Section 5.2.6.4 (Legacy Interface: Framing Requirements):
    "For SCSI commands there are additional constraints. errors, data_len, sense_len and residual MUST
    reside in a single, separate device-writable descriptor, sense MUST reside in a single separate devicewritable
    descriptor of size 96 bytes, and errors, data_len, sense_len and residual MUST reside a single
    separate device-writable descriptor."


    Thanks
    Gil Savir

    ---------------------------------------------------------------------
    Intel Israel (74) Limited

    This e-mail and any attachments may contain confidential material for
    the sole use of the intended recipient(s). Any review or distribution
    by others is strictly prohibited. If you are not the intended
    recipient, please contact the sender and delete all copies.



  • 2.  Re: [virtio-comment] Block Device: Legacy SCSI 'cmd' Framing Requirements

    Posted 02-25-2019 17:01
    On Sun, Feb 24, 2019 at 12:30:48PM +0000, Savir, Gil wrote:
    > When using Block-device, legacy scsi commands, while VIRTIO_F_ANY_LAYOUT is negotiated, it is not clear if 'cmd' field must reside in a single, separate device-readable buffer.

    I haven't looked into this but it's worth mentioning that virtio-blk
    SCSI commands are discouraged and probably disabled in modern Linux
    distros (for example, I just checked that the Fedora 29 kernel disables
    it in the guest driver).

    If anyone is planning to make use of this legacy feature, it would be
    worth checking carefully that the required set of guest drivers and
    hypervisors actually implement this feature.

    Stefan



  • 3.  Re: [virtio-comment] Block Device: Legacy SCSI 'cmd' Framing Requirements

    Posted 02-26-2019 12:13
    On 24/02/19 13:30, Savir, Gil wrote:
    > Regarding  Version 1.1 draft 01
    >
    >  
    >
    > When using Block-device, legacy scsi commands, while VIRTIO_F_ANY_LAYOUT
    > is negotiated, it is not clear if ‘cmd’ field must reside in a single,
    > separate device-readable buffer.
    >
    > In Section 5.2.6.3 it is written, in general (without reference to
    > VIRTIO_F_ANY_LAYOUT) that ‘cmd’ field must reside in a single buffer.
    >
    > Section 5.2.6.4, 2^nd bullet describes framing requirements for SCSI
    > commands, but does not refer to ‘cmd’ field.
    >
    > I suggest adding description of ‘cmd’ field  framing requirement in this
    > bullet, as well.

    Indeed, the legacy SCSI interface's framing requirements override
    VIRTIO_F_ANY_LAYOUT (and the impossibility of adjusting this was one of
    the reasons to dro it).

    Paolo