]> git.proxmox.com Git - mirror_qemu.git/commit
vhost-user: add shared_object msg
authorAlbert Esteve <aesteve@redhat.com>
Mon, 2 Oct 2023 06:57:05 +0000 (08:57 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 4 Oct 2023 22:15:06 +0000 (18:15 -0400)
commit160947666276c5b7f6bca4d746bcac2966635d79
treee8490108aee8e3dcda1d0a6cdf858f87f4c81de4
parentfaefdba8474fbc30427a64caa4dcd6df611f5b60
vhost-user: add shared_object msg

Add three new vhost-user protocol
`VHOST_USER_BACKEND_SHARED_OBJECT_* messages`.
These new messages are sent from vhost-user
back-ends to interact with the virtio-dmabuf
table in order to add or remove themselves as
virtio exporters, or lookup for virtio dma-buf
shared objects.

The action taken in the front-end depends
on the type stored in the virtio shared
object hash table.

When the table holds a pointer to a vhost
backend for a given UUID, the front-end sends
a VHOST_USER_GET_SHARED_OBJECT to the
backend holding the shared object.

The messages can only be sent after successfully
negotiating a new VHOST_USER_PROTOCOL_F_SHARED_OBJECT
vhost-user protocol feature bit.

Finally, refactor code to send response message so
that all common parts both for the common REPLY_ACK
case, and other data responses, can call it and
avoid code repetition.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
Message-Id: <20231002065706.94707-4-aesteve@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
docs/interop/vhost-user.rst
hw/virtio/vhost-user.c
include/hw/virtio/vhost-backend.h
include/hw/virtio/vhost-user.h