OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [virtio-comment] protocol-level sector size for virtio-scsi

On 07/09/2015 15:07, Laszlo Ersek wrote:
> This size is however not spelled out. I think it is assumed by the
> standard that readers will just "inherit" the 512 byte sector size (on
> the virtio protocl level) for the purposes of the
> "virtio_scsi_config.max_sectors" field. However, since the virtio-block
> and virtio-scsi chapters are siblings, not ancestors/descendants, this
> assumption of inheritance is incorrect in my option.
> With regard to virtio implementations,
> (1) the Linux kernel guest does this:
> * In "drivers/scsi/virtio_scsi.c", function virtscsi_probe(), the
>   max_sectors value is assigned to "shost->max_sectors". ("shost" being
>   of type Scsi_Host, allocated with scsi_host_alloc().)
> * In "drivers/scsi/scsi_lib.c", function __scsi_init_queue() calls
>   blk_queue_max_hw_sectors() with "shost->max_sectors".
> * In "block/blk-settings.c", the function blk_queue_max_hw_sectors() has
>   the following comment:
>   @max_hw_sectors: max hardware sectors in the usual 512b unit
> (2) The virtio-win guest driver (called vioscsi) retrieves the
>     max_sectors setting (see GetScsiConfig() in "vioscsi/helper.c"), but
>     doesn't use it for anything, apparently.
> (3) SeaBIOS does not use this config field.
> (4) OVMF uses the field and considers the (virtio protocol level) sector
>     size to be 512 bytes, similarly to Linux (1), and to the
>     virtio-block chapter in the specification.
> Therefore I request that the sector size, for the purposes of
> "virtio_scsi_config.max_sectors", be specified as 512 bytes.

Yes, this is the correct interpretation.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]