From: Alyssa Ross <hi@alyssa.is>
To: Albert Esteve <aesteve@redhat.com>, qemu-devel@nongnu.org
Cc: jasowang@redhat.com, slp@redhat.com,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Laurent Vivier" <lvivier@redhat.com>,
manos.pitsidianakis@linaro.org, stevensd@chromium.org,
dbassey@redhat.com, "Stefano Garzarella" <sgarzare@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Peter Xu" <peterx@redhat.com>,
stefanha@redhat.com, "Alex Bennée" <alex.bennee@linaro.org>,
mst@redhat.com, "Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v12 3/7] vhost_user.rst: Add SHMEM_MAP/_UNMAP to spec
Date: Thu, 05 Feb 2026 14:53:27 +0100 [thread overview]
Message-ID: <87cy2jl2js.fsf@alyssa.is> (raw)
In-Reply-To: <20260204093758.1250167-2-aesteve@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2210 bytes --]
Albert Esteve <aesteve@redhat.com> writes:
> +``VHOST_USER_BACKEND_SHMEM_MAP``
> + :id: 9
> + :equivalent ioctl: N/A
> + :request payload: fd and ``struct VhostUserMMap``
> + :reply payload: N/A
> +
> + When the ``VHOST_USER_PROTOCOL_F_SHMEM`` protocol feature has been
> + successfully negotiated, this message can be submitted by the backends to
> + advertise a new mapping to be made in a given VIRTIO Shared Memory Region.
> + Upon receiving the message, the front-end will mmap the given fd into the
> + VIRTIO Shared Memory Region with the requested ``shmid``.
> + If ``VHOST_USER_PROTOCOL_F_REPLY_ACK`` is negotiated, and
> + back-end set the ``VHOST_USER_NEED_REPLY`` flag, the front-end
> + must respond with zero when operation is successfully completed,
> + or non-zero otherwise.
> +
> + Mapping over an already existing map is not allowed and requests shall fail.
> + Therefore, the memory range in the request must correspond with a valid,
> + free region of the VIRTIO Shared Memory Region. Also, note that mappings
> + consume resources and that the request can fail when there are no resources
> + available. Lastly, mappings are automatically unmapped by the front-end
> + across device reset operation.
> +
> +``VHOST_USER_BACKEND_SHMEM_UNMAP``
> + :id: 10
> + :equivalent ioctl: N/A
> + :request payload: ``struct VhostUserMMap``
> + :reply payload: N/A
> +
> + When the ``VHOST_USER_PROTOCOL_F_SHMEM`` protocol feature has been
> + successfully negotiated, this message can be submitted by the backends so
> + that the front-end un-mmaps a given range (``shm_offset``, ``len``) in the
> + VIRTIO Shared Memory Region with the requested ``shmid``. Note that the
> + given range shall correspond to the entirety of a valid mapped region.
> + A reply is generated indicating whether unmapping succeeded.
Shouldn't this be phrased like VHOST_USER_BACKEND_SHMEM_MAP above,
since as we've established replies are only generated if negotiated?
If ``VHOST_USER_PROTOCOL_F_REPLY_ACK`` is negotiated, and the back-end
sets the ``VHOST_USER_NEED_REPLY`` flag, the front-end must respond with
zero when operation is successfully completed, or non-zero otherwise.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2026-02-07 19:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 9:37 [PATCH v12 2/7] vhost_user.rst: Align VhostUserMsg excerpt members Albert Esteve
2026-02-04 9:37 ` [PATCH v12 3/7] vhost_user.rst: Add SHMEM_MAP/_UNMAP to spec Albert Esteve
2026-02-05 13:53 ` Alyssa Ross [this message]
2026-02-09 8:38 ` Albert Esteve
2026-02-04 9:37 ` [PATCH v12 4/7] vhost_user: Add frontend get_shmem_config command Albert Esteve
2026-02-04 9:37 ` [PATCH v12 5/7] vhost_user.rst: Add GET_SHMEM_CONFIG message Albert Esteve
2026-02-05 13:55 ` Alyssa Ross
2026-02-09 8:43 ` Albert Esteve
2026-02-09 11:39 ` Alyssa Ross
2026-02-04 9:37 ` [PATCH v12 6/7] qmp: add shmem feature map Albert Esteve
2026-02-04 9:37 ` [PATCH v12 7/7] vhost-user-device: Add shared memory BAR Albert Esteve
2026-02-08 17:18 ` [PATCH v12 2/7] vhost_user.rst: Align VhostUserMsg excerpt members Michael S. Tsirkin
2026-02-09 8:32 ` Albert Esteve
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=87cy2jl2js.fsf@alyssa.is \
--to=hi@alyssa.is \
--cc=aesteve@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=dbassey@redhat.com \
--cc=farosas@suse.de \
--cc=jasowang@redhat.com \
--cc=lvivier@redhat.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=slp@redhat.com \
--cc=stefanha@redhat.com \
--cc=stevensd@chromium.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 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.