Re: [PATCH v1 2/4] virtio-msg: Add virtio-msg, a message based virtio transport layer

Demi Marie Obenour
2026-02-25T12:37:15Z

[-- Attachment #1.1.1: Type: text/plain, Size: 871 bytes --]

On 1/26/26 11:32, Bill Mills wrote:

(snip)

> +\msgdef{GET_SHM}
> +
> +\msgref{GET_SHM} returns the location and size of a device-owned shared memory
> +region. The request carries the region index; the response echoes the index and
> +provides the base address and length. A length of zero indicates that the
> +specified region does not exist.
> +
> +\begin{lstlisting}
> +struct virtio_msg_get_shm_req {
> + le32 index; /* shared memory region index */
> +};
> +
> +struct virtio_msg_get_shm_resp {
> + le32 index; /* echoed index */
> + le32 length; /* region length (0 if nonexistent) */
> + le32 address;/* region address */
> +};
> +\end{lstlisting}

Why only le32? Some shared memory regions, such as mapped GPU buffers,
can be much larger than 2^32 bytes.
--
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]