* [PATCH v2] gpu: add missing controlq (3d) struct listings
@ 2026-05-15 9:14 Manos Pitsidianakis
2026-05-21 9:02 ` Matias Ezequiel Vara Larsen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Manos Pitsidianakis @ 2026-05-15 9:14 UTC (permalink / raw)
To: virtio-comment; +Cc: Alex Bennée, Manos Pitsidianakis
Lifted from include/uapi/linux/virtio_gpu.h with adjustments.
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/239
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
---
Changes in v2:
- s/destroyes/destroys (thanks Matias)
- Link to v1: https://lore.kernel.org/virtio-comment/20260304-virtio-gpu-missing-structs-v1-1-654218322e6a@linaro.org
---
device-types/gpu/description.tex | 75 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 74 insertions(+), 1 deletion(-)
diff --git a/device-types/gpu/description.tex b/device-types/gpu/description.tex
index ac3b427725f6036ca069b398fdde712cab833225..b61f298cfb82d2577f7e0452662c5b92a92bcb1e 100644
--- a/device-types/gpu/description.tex
+++ b/device-types/gpu/description.tex
@@ -749,21 +749,94 @@ \subsubsection{Device Operation: controlq (3d)}\label{sec:Device Types / GPU Dev
If the lower 8-bits of the \field{context_init} are zero, then the type of
the context is determined by the device.
-\item[VIRTIO_GPU_CMD_CTX_DESTROY]
+\item[VIRTIO_GPU_CMD_CTX_DESTROY] destroys a context.
+ Request data is \field{struct virtio_gpu_ctx_destroy}.
+ Response type is VIRTIO_GPU_RESP_OK_NODATA.
+
+\begin{lstlisting}
+struct virtio_gpu_ctx_destroy {
+ struct virtio_gpu_ctrl_hdr hdr;
+};
+\end{lstlisting}
+
\item[VIRTIO_GPU_CMD_CTX_ATTACH_RESOURCE]
\item[VIRTIO_GPU_CMD_CTX_DETACH_RESOURCE]
Manage virtio-gpu 3d contexts.
+ Request data is \field{struct virtio_gpu_ctx_resource}.
+ Response type is VIRTIO_GPU_RESP_OK_NODATA.
+
+\begin{lstlisting}
+struct virtio_gpu_ctx_resource {
+ struct virtio_gpu_ctrl_hdr hdr;
+ le32 resource_id;
+ le32 padding;
+};
+\end{lstlisting}
\item[VIRTIO_GPU_CMD_RESOURCE_CREATE_3D]
Create virtio-gpu 3d resources.
+ Request data is \field{struct virtio_gpu_resource_create_3d}.
+ Response type is VIRTIO_GPU_RESP_OK_NODATA.
+
+\begin{lstlisting}
+#define VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP (1 << 0)
+struct virtio_gpu_resource_create_3d {
+ struct virtio_gpu_ctrl_hdr hdr;
+ le32 resource_id;
+ le32 target;
+ le32 format;
+ le32 bind;
+ le32 width;
+ le32 height;
+ le32 depth;
+ le32 array_size;
+ le32 last_level;
+ le32 nr_samples;
+ le32 flags;
+ le32 padding;
+};
+\end{lstlisting}
\item[VIRTIO_GPU_CMD_TRANSFER_TO_HOST_3D]
\item[VIRTIO_GPU_CMD_TRANSFER_FROM_HOST_3D]
Transfer data from and to virtio-gpu 3d resources.
+ Request data is \field{struct virtio_gpu_transfer_host_3d}.
+ Response type is VIRTIO_GPU_RESP_OK_NODATA.
+
+\begin{lstlisting}
+struct virtio_gpu_box {
+ le32 x, y, z;
+ le32 w, h, d;
+};
+
+struct virtio_gpu_transfer_host_3d {
+ struct virtio_gpu_ctrl_hdr hdr;
+ struct virtio_gpu_box box;
+ le64 offset;
+ le32 resource_id;
+ le32 level;
+ le32 stride;
+ le32 layer_stride;
+};
+\end{lstlisting}
\item[VIRTIO_GPU_CMD_SUBMIT_3D]
Submit an opaque command stream. The type of the command stream is
determined when creating a context.
+ Request data is \field{struct virtio_gpu_cmd_submit}, followed by the stream bytes.
+ Response type is VIRTIO_GPU_RESP_OK_NODATA.
+
+\begin{lstlisting}
+struct virtio_gpu_cmd_submit {
+ struct virtio_gpu_ctrl_hdr hdr;
+ le32 size;
+ le32 padding;
+};
+\end{lstlisting}
+
+\begin{description}
+ \item[\field{size}] the size of the opaque command stream in bytes.
+\end{description}
\item[VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB] maps a host-only
blob resource into an offset in the host visible memory region. Request
---
base-commit: 15f488c162107f7b52fb2e4d0f36a2349fe9d3a9
change-id: 20260304-virtio-gpu-missing-structs-dc8f75a7d370
Best regards,
--
Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] gpu: add missing controlq (3d) struct listings
2026-05-15 9:14 [PATCH v2] gpu: add missing controlq (3d) struct listings Manos Pitsidianakis
@ 2026-05-21 9:02 ` Matias Ezequiel Vara Larsen
2026-05-21 14:02 ` Sumit Semwal
2026-05-28 5:54 ` Manos Pitsidianakis
2 siblings, 0 replies; 4+ messages in thread
From: Matias Ezequiel Vara Larsen @ 2026-05-21 9:02 UTC (permalink / raw)
To: Manos Pitsidianakis; +Cc: virtio-comment, Alex Bennée
On Fri, May 15, 2026 at 12:14:31PM +0300, Manos Pitsidianakis wrote:
> Lifted from include/uapi/linux/virtio_gpu.h with adjustments.
>
> Fixes: https://github.com/oasis-tcs/virtio-spec/issues/239
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
> Changes in v2:
> - s/destroyes/destroys (thanks Matias)
> - Link to v1: https://lore.kernel.org/virtio-comment/20260304-virtio-gpu-missing-structs-v1-1-654218322e6a@linaro.org
> ---
Reviewed-by: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
Thanks.
> device-types/gpu/description.tex | 75 +++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 74 insertions(+), 1 deletion(-)
>
> diff --git a/device-types/gpu/description.tex b/device-types/gpu/description.tex
> index ac3b427725f6036ca069b398fdde712cab833225..b61f298cfb82d2577f7e0452662c5b92a92bcb1e 100644
> --- a/device-types/gpu/description.tex
> +++ b/device-types/gpu/description.tex
> @@ -749,21 +749,94 @@ \subsubsection{Device Operation: controlq (3d)}\label{sec:Device Types / GPU Dev
> If the lower 8-bits of the \field{context_init} are zero, then the type of
> the context is determined by the device.
>
> -\item[VIRTIO_GPU_CMD_CTX_DESTROY]
> +\item[VIRTIO_GPU_CMD_CTX_DESTROY] destroys a context.
> + Request data is \field{struct virtio_gpu_ctx_destroy}.
> + Response type is VIRTIO_GPU_RESP_OK_NODATA.
> +
> +\begin{lstlisting}
> +struct virtio_gpu_ctx_destroy {
> + struct virtio_gpu_ctrl_hdr hdr;
> +};
> +\end{lstlisting}
> +
> \item[VIRTIO_GPU_CMD_CTX_ATTACH_RESOURCE]
> \item[VIRTIO_GPU_CMD_CTX_DETACH_RESOURCE]
> Manage virtio-gpu 3d contexts.
> + Request data is \field{struct virtio_gpu_ctx_resource}.
> + Response type is VIRTIO_GPU_RESP_OK_NODATA.
> +
> +\begin{lstlisting}
> +struct virtio_gpu_ctx_resource {
> + struct virtio_gpu_ctrl_hdr hdr;
> + le32 resource_id;
> + le32 padding;
> +};
> +\end{lstlisting}
>
> \item[VIRTIO_GPU_CMD_RESOURCE_CREATE_3D]
> Create virtio-gpu 3d resources.
> + Request data is \field{struct virtio_gpu_resource_create_3d}.
> + Response type is VIRTIO_GPU_RESP_OK_NODATA.
> +
> +\begin{lstlisting}
> +#define VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP (1 << 0)
> +struct virtio_gpu_resource_create_3d {
> + struct virtio_gpu_ctrl_hdr hdr;
> + le32 resource_id;
> + le32 target;
> + le32 format;
> + le32 bind;
> + le32 width;
> + le32 height;
> + le32 depth;
> + le32 array_size;
> + le32 last_level;
> + le32 nr_samples;
> + le32 flags;
> + le32 padding;
> +};
> +\end{lstlisting}
>
> \item[VIRTIO_GPU_CMD_TRANSFER_TO_HOST_3D]
> \item[VIRTIO_GPU_CMD_TRANSFER_FROM_HOST_3D]
> Transfer data from and to virtio-gpu 3d resources.
> + Request data is \field{struct virtio_gpu_transfer_host_3d}.
> + Response type is VIRTIO_GPU_RESP_OK_NODATA.
> +
> +\begin{lstlisting}
> +struct virtio_gpu_box {
> + le32 x, y, z;
> + le32 w, h, d;
> +};
> +
> +struct virtio_gpu_transfer_host_3d {
> + struct virtio_gpu_ctrl_hdr hdr;
> + struct virtio_gpu_box box;
> + le64 offset;
> + le32 resource_id;
> + le32 level;
> + le32 stride;
> + le32 layer_stride;
> +};
> +\end{lstlisting}
>
> \item[VIRTIO_GPU_CMD_SUBMIT_3D]
> Submit an opaque command stream. The type of the command stream is
> determined when creating a context.
> + Request data is \field{struct virtio_gpu_cmd_submit}, followed by the stream bytes.
> + Response type is VIRTIO_GPU_RESP_OK_NODATA.
> +
> +\begin{lstlisting}
> +struct virtio_gpu_cmd_submit {
> + struct virtio_gpu_ctrl_hdr hdr;
> + le32 size;
> + le32 padding;
> +};
> +\end{lstlisting}
> +
> +\begin{description}
> + \item[\field{size}] the size of the opaque command stream in bytes.
> +\end{description}
>
> \item[VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB] maps a host-only
> blob resource into an offset in the host visible memory region. Request
>
> ---
> base-commit: 15f488c162107f7b52fb2e4d0f36a2349fe9d3a9
> change-id: 20260304-virtio-gpu-missing-structs-dc8f75a7d370
>
> Best regards,
> --
> Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] gpu: add missing controlq (3d) struct listings
2026-05-15 9:14 [PATCH v2] gpu: add missing controlq (3d) struct listings Manos Pitsidianakis
2026-05-21 9:02 ` Matias Ezequiel Vara Larsen
@ 2026-05-21 14:02 ` Sumit Semwal
2026-05-28 5:54 ` Manos Pitsidianakis
2 siblings, 0 replies; 4+ messages in thread
From: Sumit Semwal @ 2026-05-21 14:02 UTC (permalink / raw)
To: Manos Pitsidianakis; +Cc: virtio-comment, Alex Bennée
Hello Manos,
On Fri, 15 May 2026 at 15:07, Manos Pitsidianakis
<manos.pitsidianakis@linaro.org> wrote:
>
> Lifted from include/uapi/linux/virtio_gpu.h with adjustments.
>
> Fixes: https://github.com/oasis-tcs/virtio-spec/issues/239
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Thanks; please feel free to add:
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Best,
Sumit.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] gpu: add missing controlq (3d) struct listings
2026-05-15 9:14 [PATCH v2] gpu: add missing controlq (3d) struct listings Manos Pitsidianakis
2026-05-21 9:02 ` Matias Ezequiel Vara Larsen
2026-05-21 14:02 ` Sumit Semwal
@ 2026-05-28 5:54 ` Manos Pitsidianakis
2 siblings, 0 replies; 4+ messages in thread
From: Manos Pitsidianakis @ 2026-05-28 5:54 UTC (permalink / raw)
To: virtio-comment
Could we open a voting ballot for these changes?
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/239
On Fri, May 15, 2026 at 12:14 PM Manos Pitsidianakis
<manos.pitsidianakis@linaro.org> wrote:
>
> Lifted from include/uapi/linux/virtio_gpu.h with adjustments.
>
> Fixes: https://github.com/oasis-tcs/virtio-spec/issues/239
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
> Changes in v2:
> - s/destroyes/destroys (thanks Matias)
> - Link to v1: https://lore.kernel.org/virtio-comment/20260304-virtio-gpu-missing-structs-v1-1-654218322e6a@linaro.org
> ---
> device-types/gpu/description.tex | 75 +++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 74 insertions(+), 1 deletion(-)
>
> diff --git a/device-types/gpu/description.tex b/device-types/gpu/description.tex
> index ac3b427725f6036ca069b398fdde712cab833225..b61f298cfb82d2577f7e0452662c5b92a92bcb1e 100644
> --- a/device-types/gpu/description.tex
> +++ b/device-types/gpu/description.tex
> @@ -749,21 +749,94 @@ \subsubsection{Device Operation: controlq (3d)}\label{sec:Device Types / GPU Dev
> If the lower 8-bits of the \field{context_init} are zero, then the type of
> the context is determined by the device.
>
> -\item[VIRTIO_GPU_CMD_CTX_DESTROY]
> +\item[VIRTIO_GPU_CMD_CTX_DESTROY] destroys a context.
> + Request data is \field{struct virtio_gpu_ctx_destroy}.
> + Response type is VIRTIO_GPU_RESP_OK_NODATA.
> +
> +\begin{lstlisting}
> +struct virtio_gpu_ctx_destroy {
> + struct virtio_gpu_ctrl_hdr hdr;
> +};
> +\end{lstlisting}
> +
> \item[VIRTIO_GPU_CMD_CTX_ATTACH_RESOURCE]
> \item[VIRTIO_GPU_CMD_CTX_DETACH_RESOURCE]
> Manage virtio-gpu 3d contexts.
> + Request data is \field{struct virtio_gpu_ctx_resource}.
> + Response type is VIRTIO_GPU_RESP_OK_NODATA.
> +
> +\begin{lstlisting}
> +struct virtio_gpu_ctx_resource {
> + struct virtio_gpu_ctrl_hdr hdr;
> + le32 resource_id;
> + le32 padding;
> +};
> +\end{lstlisting}
>
> \item[VIRTIO_GPU_CMD_RESOURCE_CREATE_3D]
> Create virtio-gpu 3d resources.
> + Request data is \field{struct virtio_gpu_resource_create_3d}.
> + Response type is VIRTIO_GPU_RESP_OK_NODATA.
> +
> +\begin{lstlisting}
> +#define VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP (1 << 0)
> +struct virtio_gpu_resource_create_3d {
> + struct virtio_gpu_ctrl_hdr hdr;
> + le32 resource_id;
> + le32 target;
> + le32 format;
> + le32 bind;
> + le32 width;
> + le32 height;
> + le32 depth;
> + le32 array_size;
> + le32 last_level;
> + le32 nr_samples;
> + le32 flags;
> + le32 padding;
> +};
> +\end{lstlisting}
>
> \item[VIRTIO_GPU_CMD_TRANSFER_TO_HOST_3D]
> \item[VIRTIO_GPU_CMD_TRANSFER_FROM_HOST_3D]
> Transfer data from and to virtio-gpu 3d resources.
> + Request data is \field{struct virtio_gpu_transfer_host_3d}.
> + Response type is VIRTIO_GPU_RESP_OK_NODATA.
> +
> +\begin{lstlisting}
> +struct virtio_gpu_box {
> + le32 x, y, z;
> + le32 w, h, d;
> +};
> +
> +struct virtio_gpu_transfer_host_3d {
> + struct virtio_gpu_ctrl_hdr hdr;
> + struct virtio_gpu_box box;
> + le64 offset;
> + le32 resource_id;
> + le32 level;
> + le32 stride;
> + le32 layer_stride;
> +};
> +\end{lstlisting}
>
> \item[VIRTIO_GPU_CMD_SUBMIT_3D]
> Submit an opaque command stream. The type of the command stream is
> determined when creating a context.
> + Request data is \field{struct virtio_gpu_cmd_submit}, followed by the stream bytes.
> + Response type is VIRTIO_GPU_RESP_OK_NODATA.
> +
> +\begin{lstlisting}
> +struct virtio_gpu_cmd_submit {
> + struct virtio_gpu_ctrl_hdr hdr;
> + le32 size;
> + le32 padding;
> +};
> +\end{lstlisting}
> +
> +\begin{description}
> + \item[\field{size}] the size of the opaque command stream in bytes.
> +\end{description}
>
> \item[VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB] maps a host-only
> blob resource into an offset in the host visible memory region. Request
>
> ---
> base-commit: 15f488c162107f7b52fb2e4d0f36a2349fe9d3a9
> change-id: 20260304-virtio-gpu-missing-structs-dc8f75a7d370
>
> Best regards,
> --
> Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-28 5:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 9:14 [PATCH v2] gpu: add missing controlq (3d) struct listings Manos Pitsidianakis
2026-05-21 9:02 ` Matias Ezequiel Vara Larsen
2026-05-21 14:02 ` Sumit Semwal
2026-05-28 5:54 ` Manos Pitsidianakis
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.