* [virtio-dev] [PATCH] virtio-blk: document VIRTIO_BLK_T_GET_ID
@ 2019-12-02 10:02 Stefan Hajnoczi
2019-12-02 10:14 ` Jan Kiszka
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2019-12-02 10:02 UTC (permalink / raw)
To: virtio-dev; +Cc: Jan Kiszka, Stefan Hajnoczi
The VIRTIO_BLK_T_GET_ID request type was implemented in Linux and QEMU
in 2010. It does not have a feature bit but devices respond with
VIRTIO_BLK_S_UNSUPP if a request type is unimplemented.
This patch documents the VIRTIO_BLK_T_GET_ID request type as currently
implemented in Linux and QEMU.
Suggested-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
content.tex | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/content.tex b/content.tex
index d68cfaf..b8baaad 100644
--- a/content.tex
+++ b/content.tex
@@ -4094,12 +4094,14 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
The type of the request is either a read (VIRTIO_BLK_T_IN), a write
(VIRTIO_BLK_T_OUT), a discard (VIRTIO_BLK_T_DISCARD), a write zeroes
-(VIRTIO_BLK_T_WRITE_ZEROES) or a flush (VIRTIO_BLK_T_FLUSH).
+(VIRTIO_BLK_T_WRITE_ZEROES), a flush (VIRTIO_BLK_T_FLUSH), or a get device ID
+string command (VIRTIO_BLK_T_GET_ID).
\begin{lstlisting}
#define VIRTIO_BLK_T_IN 0
#define VIRTIO_BLK_T_OUT 1
#define VIRTIO_BLK_T_FLUSH 4
+#define VIRTIO_BLK_T_GET_ID 8
#define VIRTIO_BLK_T_DISCARD 11
#define VIRTIO_BLK_T_WRITE_ZEROES 13
\end{lstlisting}
@@ -4135,6 +4137,10 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
the device to discard the specified range, provided that following reads return
zeroes.
+VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the device into
+\field{data}. The device ID string is a NUL-padded ASCII string up to 20 bytes
+long. If the string is 20 bytes long then there is no NUL terminator.
+
The final \field{status} byte is written by the device: either
VIRTIO_BLK_S_OK for success, VIRTIO_BLK_S_IOERR for device or driver
error or VIRTIO_BLK_S_UNSUPP for a request unsupported by device:
@@ -4166,6 +4172,8 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
virtio_blk_discard_write_zeroes for VIRTIO_BLK_T_DISCARD and
VIRTIO_BLK_T_WRITE_ZEROES requests.
+The length of \field{data} MUST be 20 bytes for VIRTIO_BLK_T_GET_ID requests.
+
VIRTIO_BLK_T_DISCARD requests MUST NOT contain more than
\field{max_discard_seg} struct virtio_blk_discard_write_zeroes segments in
\field{data}.
--
2.23.0
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [virtio-dev] [PATCH] virtio-blk: document VIRTIO_BLK_T_GET_ID
2019-12-02 10:02 [virtio-dev] [PATCH] virtio-blk: document VIRTIO_BLK_T_GET_ID Stefan Hajnoczi
@ 2019-12-02 10:14 ` Jan Kiszka
2019-12-02 10:25 ` Matti Moell
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2019-12-02 10:14 UTC (permalink / raw)
To: Stefan Hajnoczi, virtio-dev
On 02.12.19 11:02, Stefan Hajnoczi wrote:
> The VIRTIO_BLK_T_GET_ID request type was implemented in Linux and QEMU
> in 2010. It does not have a feature bit but devices respond with
> VIRTIO_BLK_S_UNSUPP if a request type is unimplemented.
>
> This patch documents the VIRTIO_BLK_T_GET_ID request type as currently
> implemented in Linux and QEMU.
>
> Suggested-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> content.tex | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/content.tex b/content.tex
> index d68cfaf..b8baaad 100644
> --- a/content.tex
> +++ b/content.tex
> @@ -4094,12 +4094,14 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
>
> The type of the request is either a read (VIRTIO_BLK_T_IN), a write
> (VIRTIO_BLK_T_OUT), a discard (VIRTIO_BLK_T_DISCARD), a write zeroes
> -(VIRTIO_BLK_T_WRITE_ZEROES) or a flush (VIRTIO_BLK_T_FLUSH).
> +(VIRTIO_BLK_T_WRITE_ZEROES), a flush (VIRTIO_BLK_T_FLUSH), or a get device ID
> +string command (VIRTIO_BLK_T_GET_ID).
>
> \begin{lstlisting}
> #define VIRTIO_BLK_T_IN 0
> #define VIRTIO_BLK_T_OUT 1
> #define VIRTIO_BLK_T_FLUSH 4
> +#define VIRTIO_BLK_T_GET_ID 8
> #define VIRTIO_BLK_T_DISCARD 11
> #define VIRTIO_BLK_T_WRITE_ZEROES 13
> \end{lstlisting}
> @@ -4135,6 +4137,10 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
> the device to discard the specified range, provided that following reads return
> zeroes.
>
> +VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the device into
> +\field{data}. The device ID string is a NUL-padded ASCII string up to 20 bytes
> +long. If the string is 20 bytes long then there is no NUL terminator.
> +
> The final \field{status} byte is written by the device: either
> VIRTIO_BLK_S_OK for success, VIRTIO_BLK_S_IOERR for device or driver
> error or VIRTIO_BLK_S_UNSUPP for a request unsupported by device:
> @@ -4166,6 +4172,8 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
> virtio_blk_discard_write_zeroes for VIRTIO_BLK_T_DISCARD and
> VIRTIO_BLK_T_WRITE_ZEROES requests.
>
> +The length of \field{data} MUST be 20 bytes for VIRTIO_BLK_T_GET_ID requests.
> +
> VIRTIO_BLK_T_DISCARD requests MUST NOT contain more than
> \field{max_discard_seg} struct virtio_blk_discard_write_zeroes segments in
> \field{data}.
>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [virtio-dev] [PATCH] virtio-blk: document VIRTIO_BLK_T_GET_ID
2019-12-02 10:02 [virtio-dev] [PATCH] virtio-blk: document VIRTIO_BLK_T_GET_ID Stefan Hajnoczi
2019-12-02 10:14 ` Jan Kiszka
@ 2019-12-02 10:25 ` Matti Moell
2019-12-02 12:40 ` Cornelia Huck
2019-12-02 16:29 ` [virtio-dev] " Stefan Hajnoczi
3 siblings, 0 replies; 5+ messages in thread
From: Matti Moell @ 2019-12-02 10:25 UTC (permalink / raw)
To: Stefan Hajnoczi, virtio-dev; +Cc: Jan Kiszka
On 02.12.19 11:02, Stefan Hajnoczi wrote:
> The VIRTIO_BLK_T_GET_ID request type was implemented in Linux and QEMU
> in 2010. It does not have a feature bit but devices respond with
> VIRTIO_BLK_S_UNSUPP if a request type is unimplemented.
>
> This patch documents the VIRTIO_BLK_T_GET_ID request type as currently
> implemented in Linux and QEMU.
>
> Suggested-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> content.tex | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
Reviewed-by: Matti Möll <Matti.Moell@opensynergy.com>
I wanted to ask the same question hours before seeing Jans mail about
it, thank you very much for picking this up.
Cheers,
Matti
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [virtio-dev] [PATCH] virtio-blk: document VIRTIO_BLK_T_GET_ID
2019-12-02 10:02 [virtio-dev] [PATCH] virtio-blk: document VIRTIO_BLK_T_GET_ID Stefan Hajnoczi
2019-12-02 10:14 ` Jan Kiszka
2019-12-02 10:25 ` Matti Moell
@ 2019-12-02 12:40 ` Cornelia Huck
2019-12-02 16:29 ` [virtio-dev] " Stefan Hajnoczi
3 siblings, 0 replies; 5+ messages in thread
From: Cornelia Huck @ 2019-12-02 12:40 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: virtio-dev, Jan Kiszka
On Mon, 2 Dec 2019 10:02:16 +0000
Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The VIRTIO_BLK_T_GET_ID request type was implemented in Linux and QEMU
> in 2010. It does not have a feature bit but devices respond with
> VIRTIO_BLK_S_UNSUPP if a request type is unimplemented.
>
> This patch documents the VIRTIO_BLK_T_GET_ID request type as currently
> implemented in Linux and QEMU.
>
> Suggested-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> content.tex | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* [virtio-dev] Re: [PATCH] virtio-blk: document VIRTIO_BLK_T_GET_ID
2019-12-02 10:02 [virtio-dev] [PATCH] virtio-blk: document VIRTIO_BLK_T_GET_ID Stefan Hajnoczi
` (2 preceding siblings ...)
2019-12-02 12:40 ` Cornelia Huck
@ 2019-12-02 16:29 ` Stefan Hajnoczi
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2019-12-02 16:29 UTC (permalink / raw)
To: virtio-dev; +Cc: Jan Kiszka
[-- Attachment #1: Type: text/plain, Size: 644 bytes --]
On Mon, Dec 02, 2019 at 10:02:16AM +0000, Stefan Hajnoczi wrote:
> The VIRTIO_BLK_T_GET_ID request type was implemented in Linux and QEMU
> in 2010. It does not have a feature bit but devices respond with
> VIRTIO_BLK_S_UNSUPP if a request type is unimplemented.
>
> This patch documents the VIRTIO_BLK_T_GET_ID request type as currently
> implemented in Linux and QEMU.
>
> Suggested-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> content.tex | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/63
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-12-02 16:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-02 10:02 [virtio-dev] [PATCH] virtio-blk: document VIRTIO_BLK_T_GET_ID Stefan Hajnoczi
2019-12-02 10:14 ` Jan Kiszka
2019-12-02 10:25 ` Matti Moell
2019-12-02 12:40 ` Cornelia Huck
2019-12-02 16:29 ` [virtio-dev] " Stefan Hajnoczi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.