virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio-spec: add field for scsi command size
Date: Thu, 14 Mar 2013 16:15:28 +0100	[thread overview]
Message-ID: <5141E990.7070609@redhat.com> (raw)
In-Reply-To: <20130314111020.GA18050@redhat.com>

Il 14/03/2013 12:10, Michael S. Tsirkin ha scritto:
> Add field for guest to specify command size for virtio-blk.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  virtio-spec.lyx | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 78 insertions(+), 5 deletions(-)
> 
> diff --git a/virtio-spec.lyx b/virtio-spec.lyx
> index a8ce3f9..fea97ed 100644
> --- a/virtio-spec.lyx
> +++ b/virtio-spec.lyx
> @@ -5826,6 +5826,16 @@ VIRTIO_BLK_F_TOPOLOGY (10) Device exports information on optimal I/O alignment.
>  \change_inserted 1531152142 1341302349
>  VIRTIO_BLK_F_CONFIG_WCE (11) Device can toggle its cache between writeback
>   and writethrough modes.
> +\change_inserted 1986246365 1363257418
> +
> +\end_layout
> +
> +\begin_layout Description
> +
> +\change_inserted 1986246365 1363258629
> +VIRTIO_BLK_F_CMD_SIZE (12) cmd_size field is valid.

SCSI_CMD_SIZE and scsi_cmd_size please.

> +\change_inserted 1531152142 1341302349
> +
>  \end_layout
>  
>  \end_deeper
> @@ -5994,6 +6004,30 @@ struct virtio_blk_config {
>  \change_inserted 1531152142 1341301918
>  
>      u8 writeback;
> +\change_inserted 1986246365 1363257385
> +
> +\end_layout
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1363258610
> +
> +    u8 reserved[3];
> +\end_layout
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1363259147
> +
> +    // buffer length for cmd field in requests.

size of the cmd field in VIRTIO_BLK_T_SCSI_CMD requests.

> + reset value 0.
> +\end_layout
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1363257810
> +
> +    u32 cmd_size;

scsi_cmd_size

>  \change_unchanged
>  
>  \end_layout
> @@ -6085,6 +6119,21 @@ Until version 1.1, QEMU remained in writeback mode even after a guest announced
>  \end_inset
>  
>  .
> +\change_inserted 1986246365 1363258989
> +
> +\end_layout
> +
> +\begin_layout Enumerate
> +
> +\change_inserted 1986246365 1363259237
> +If VIRTIO_BLK_F_SCSI_CMD_SIZE is negotiated, Guest should set the desired
> + size for scsi commands to the 

If both VIRTIO_BLK_F_SCSI and VIRTIO_BLK_F_SCSI_CMD_SIZE are negotiated,
the driver should write a non-zero value to the scsi_cmd_size field
before sending a VIRTIO_BLK_T_SCSI_CMD request.

> +\emph on
> +cmd_size 
> +\emph default
> +field.
> +\change_unchanged
> +
>  \end_layout
>  
>  \begin_layout Section*
> @@ -6369,8 +6418,33 @@ cmd
>  \emph default
>   field is only present for scsi packet command requests, and indicates the
>   command to perform.
> - This field must reside in a single, separate read-only buffer; command
> - length can be derived from the length of this buffer.
> + 
> +\change_inserted 1986246365 1363258881
> +If VIRTIO_BLK_F_SCSI_CMD_SIZE feature bit is negotiated, Guest must set
> + the command length by writing it to the cmd_size field in configuration
> + space

If the VIRTIO_BLK_F_SCSI_CMD_SIZE feature bit is negotiated, the driver
should write the length of the cmd field to the scsi_cmd_size field of
the configuration space.

(please make sure bold and emphasis are consistent)

> +\begin_inset Foot
> +status open
> +
> +\begin_layout Plain Layout
> +
> +\change_inserted 1986246365 1363258931
> +Guest should always set cmd_size during initialization.

scsi_cmd_size

> +\change_unchanged
> +
> +\end_layout
> +
> +\end_inset
> +
> +.
> + If VIRTIO_BLK_F_SCSI_CMD_SIZE is not negotiated, 
> +\change_deleted 1986246365 1363258703
> +T
> +\change_inserted 1986246365 1363258703
> +t
> +\change_unchanged
> +his field must reside in a single, separate read-only buffer; command length
> + can be derived from the length of this buffer.

the command length...

>   
>  \end_layout
>  
> 

Thanks,

Paolo

  reply	other threads:[~2013-03-14 15:15 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14 11:10 [PATCH] virtio-spec: add field for scsi command size Michael S. Tsirkin
2013-03-14 15:15 ` Paolo Bonzini [this message]
2013-03-14 17:39   ` Michael S. Tsirkin
2013-03-17  9:26     ` Michael S. Tsirkin
2013-06-13  4:42     ` Rusty Russell
2013-06-13  7:33       ` Michael S. Tsirkin
2013-06-13  8:02       ` Michael S. Tsirkin
2013-06-13  8:10         ` Michael S. Tsirkin
2013-06-17  6:37           ` Michael S. Tsirkin
2013-06-19  4:46             ` Rusty Russell
2013-06-19  8:24               ` Michael S. Tsirkin
2013-06-19  8:28                 ` Paolo Bonzini
2013-06-19  9:21                   ` Michael S. Tsirkin
2013-06-20  2:40                   ` Rusty Russell
2013-06-20  9:26                     ` Paolo Bonzini
2013-06-30 23:47                       ` Rusty Russell
2013-07-01 11:57                         ` Paolo Bonzini
2013-07-02  6:04                           ` Rusty Russell
2013-07-04  7:49                             ` Michael S. Tsirkin
2013-07-07 11:31                               ` Michael S. Tsirkin
2013-07-08  1:21                                 ` Rusty Russell
2013-07-08  5:44                                   ` Michael S. Tsirkin
2013-07-09  1:19                                     ` Rusty Russell
2013-07-04  7:39                           ` Michael S. Tsirkin
2013-07-04  9:05                             ` Paolo Bonzini
2013-07-08  4:28                               ` Rusty Russell
2013-07-04  7:38                         ` Michael S. Tsirkin
2013-06-20  2:45                 ` Rusty Russell
2013-03-18 21:47 ` Michael S. Tsirkin
2013-03-19  1:21   ` Rusty Russell
2013-03-19  7:58     ` Michael S. Tsirkin

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=5141E990.7070609@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.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).