On Wed, Mar 04, 2026 at 11:23:42AM +0100, Albert Esteve wrote:
On Wed, Mar 4, 2026 at 10:46 AM Albert Esteve <[email protected]> wrote:

On Thu, Feb 19, 2026 at 2:04 PM Albert Esteve <[email protected]> wrote:
>
> Add SHMEM_MAP/_UNMAP request to the vhost-user
> spec documentation.
>
> Reviewed-by: Stefan Hajnoczi <[email protected]>
> Reviewed-by: Manos Pitsidianakis <[email protected]>
> Signed-off-by: Albert Esteve <[email protected]>
> ---
>  docs/interop/vhost-user.rst | 61 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 61 insertions(+)
>
> diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst
> index 17a68a62eb..ae4ad6f441 100644
> --- a/docs/interop/vhost-user.rst
> +++ b/docs/interop/vhost-user.rst
> @@ -350,6 +350,27 @@ Device state transfer parameters
>    In the future, additional phases might be added e.g. to allow
>    iterative migration while the device is running.
>
> +MMAP request
> +^^^^^^^^^^^^
> +
> ++-------+---------+-----------+------------+-----+-------+
> +| shmid | padding | fd_offset | shm_offset | len | flags |
> ++-------+---------+-----------+------------+-----+-------+
> +
> +:shmid: a 8-bit shared memory region identifier
> +
> +:fd_offset: a 64-bit offset of this area from the start
> +            of the supplied file descriptor
> +
> +:shm_offset: a 64-bit offset from the start of the
> +             pointed shared memory region
> +
> +:len: a 64-bit size of the memory to map
> +
> +:flags: a 64-bit value:
> +  - 0: Pages are mapped read-only
> +  - 1: Pages are mapped read-write
> +
>  C structure
>  -----------
>
> @@ -375,6 +396,7 @@ In QEMU the vhost-user message is implemented with the 
following struct:
>            VhostUserInflight inflight;
>            VhostUserShared object;
>            VhostUserTransferDeviceState transfer_state;
> +          VhostUserMMap mmap;
>        };
>    } QEMU_PACKED VhostUserMsg;
>
> @@ -1064,6 +1086,7 @@ Protocol features
>    #define VHOST_USER_PROTOCOL_F_XEN_MMAP             17
>    #define VHOST_USER_PROTOCOL_F_SHARED_OBJECT        18
>    #define VHOST_USER_PROTOCOL_F_DEVICE_STATE         19
> +  #define VHOST_USER_PROTOCOL_F_SHMEM                20

Commit cda83adc62b6108afc8a82d0f54d9a9a861e7aa8 got upstream first and
took feature number 20, so this should be 21 now.

@Michael Tsirkin Is it worth sending a new version or will you handle
the change?

Sorry, I meant e0822e6085aecc15e2cfb2914d8cd827abae0249 (vhost-user:
introduce protocol feature for skip drain on GET_VRING_BASE).

But the question remains.

Maybe better to rebase to simplify Michael's life.

BTW this pach LGTM:

Reviewed-by: Stefano Garzarella <[email protected]>


Reply via email to