All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Virtio shared dma-buf
@ 2023-06-26  7:34 Albert Esteve
  2023-06-26  7:34 ` [PATCH v4 1/4] uuid: add a hash function Albert Esteve
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Albert Esteve @ 2023-06-26  7:34 UTC (permalink / raw)
  To: qemu-devel
  Cc: marcandre.lureau, Michael S. Tsirkin, cohuck, Albert Esteve,
	Fam Zheng, kraxel

v1 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg00598.html
v2 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg04530.html
v3 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg06126.html
v3 -> v4:
    - Split the different message types for shared objects into different messages
    - Add a vhost-user feature bit to negotiate the shared object feature
    - Minor improvements following suggestions

This patch covers the required steps to add support for virtio cross-device resource sharing[1],
which support is already available in the kernel.

The main usecase will be sharing dma buffers from virtio-gpu devices (as the exporter
-see VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID in [2]), to virtio-video (under discussion)
devices (as the buffer-user or importer). Therefore, even though virtio specs talk about
resources or objects[3], this patch adds the infrastructure with dma-bufs in mind.
Note that virtio specs let the devices themselves define what a vitio object is.

These are the main parts that are covered in the patch:

- Add hash function to uuid module
- Shared resources table, to hold all resources that can be shared in the host and their assigned UUID
- Internal shared table API for virtio devices to add, lookup and remove resources
- Unit test to verify the API
- New messages to the vhost-user protocol to allow backend to interact with the shared
  table API through the control socket
- New vhost-user feature bit to enable shared objects feature

Applies cleanly to b455ce4c2f300c8ba47cba7232dd03261368a4cb

[1] - https://lwn.net/Articles/828988/
[2] - https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-3730006
[3] - https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-10500011

Albert Esteve (4):
  uuid: add a hash function
  virtio-dmabuf: introduce virtio-dmabuf
  vhost-user: add shared_object msg
  vhost-user: refactor send_resp code

 MAINTAINERS                               |   7 ++
 docs/interop/vhost-user.rst               |  42 ++++++++
 hw/display/meson.build                    |   1 +
 hw/display/virtio-dmabuf.c                |  90 +++++++++++++++++
 hw/virtio/vhost-user.c                    | 115 +++++++++++++++++++---
 include/hw/virtio/virtio-dmabuf.h         |  59 +++++++++++
 include/qemu/uuid.h                       |   2 +
 subprojects/libvhost-user/libvhost-user.c | 101 +++++++++++++++++++
 subprojects/libvhost-user/libvhost-user.h |  53 +++++++++-
 tests/unit/meson.build                    |   1 +
 tests/unit/test-uuid.c                    |  27 +++++
 tests/unit/test-virtio-dmabuf.c           | 112 +++++++++++++++++++++
 util/uuid.c                               |  14 +++
 13 files changed, 610 insertions(+), 14 deletions(-)
 create mode 100644 hw/display/virtio-dmabuf.c
 create mode 100644 include/hw/virtio/virtio-dmabuf.h
 create mode 100644 tests/unit/test-virtio-dmabuf.c

-- 
2.40.0



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-07-28  9:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-26  7:34 [PATCH v4 0/4] Virtio shared dma-buf Albert Esteve
2023-06-26  7:34 ` [PATCH v4 1/4] uuid: add a hash function Albert Esteve
2023-06-26  7:34 ` [PATCH v4 2/4] virtio-dmabuf: introduce virtio-dmabuf Albert Esteve
2023-07-10 19:00   ` Michael S. Tsirkin
2023-07-17 13:59     ` Gerd Hoffmann
2023-06-26  7:34 ` [PATCH v4 3/4] vhost-user: add shared_object msg Albert Esteve
2023-07-10 19:03   ` Michael S. Tsirkin
2023-07-17 11:42     ` Albert Esteve
2023-07-17 14:10       ` Gerd Hoffmann
2023-07-17 14:11       ` Michael S. Tsirkin
2023-07-27 14:48         ` Albert Esteve
2023-07-27 14:56           ` Michael S. Tsirkin
2023-07-28  9:05             ` Albert Esteve
2023-06-26  7:34 ` [PATCH v4 4/4] vhost-user: refactor send_resp code Albert Esteve

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.