[Qemu-devel] [PATCH v9 0/9] Add vhost-user-gpu

Marc-André Lureau posted 9 patches 4 years, 11 months ago
Test FreeBSD passed
Test docker-clang@ubuntu passed
Test s390x passed
Test docker-mingw@fedora passed
Test checkpatch failed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190524130946.31736-1-marcandre.lureau@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
configure                                  |   17 +
contrib/libvhost-user/libvhost-user.h      |    1 +
contrib/vhost-user-gpu/virgl.h             |   25 +
contrib/vhost-user-gpu/vugbm.h             |   67 ++
contrib/vhost-user-gpu/vugpu.h             |  177 +++
hw/display/virtio-vga.h                    |   32 +
include/hw/virtio/vhost-backend.h          |    2 +
include/hw/virtio/virtio-gpu-bswap.h       |   61 +
include/hw/virtio/virtio-gpu-pci.h         |   40 +
include/hw/virtio/virtio-gpu-pixman.h      |   45 +
include/hw/virtio/virtio-gpu.h             |   92 +-
contrib/libvhost-user/libvhost-user.c      |    1 +
contrib/vhost-user-gpu/main.c              | 1185 ++++++++++++++++++++
contrib/vhost-user-gpu/virgl.c             |  579 ++++++++++
contrib/vhost-user-gpu/vugbm.c             |  328 ++++++
hw/display/vhost-user-gpu-pci.c            |   51 +
hw/display/vhost-user-gpu.c                |  607 ++++++++++
hw/display/vhost-user-vga.c                |   52 +
hw/display/virtio-gpu-3d.c                 |   49 +-
hw/display/virtio-gpu-base.c               |  268 +++++
hw/display/virtio-gpu-pci.c                |   55 +-
hw/display/virtio-gpu.c                    |  448 ++------
hw/display/virtio-vga.c                    |  138 +--
hw/virtio/vhost-user.c                     |   11 +
ui/spice-app.c                             |    3 +-
vl.c                                       |    1 +
MAINTAINERS                                |   10 +-
Makefile                                   |   24 +-
Makefile.objs                              |    1 +
contrib/vhost-user-gpu/50-qemu-gpu.json.in |    5 +
contrib/vhost-user-gpu/Makefile.objs       |   10 +
docs/interop/index.rst                     |    1 +
docs/interop/vhost-user-gpu.rst            |  242 ++++
docs/interop/vhost-user.rst                |    9 +
hw/display/Kconfig                         |   10 +
hw/display/Makefile.objs                   |    5 +-
rules.mak                                  |    9 +-
util/Makefile.objs                         |    2 +-
38 files changed, 4176 insertions(+), 487 deletions(-)
create mode 100644 contrib/vhost-user-gpu/virgl.h
create mode 100644 contrib/vhost-user-gpu/vugbm.h
create mode 100644 contrib/vhost-user-gpu/vugpu.h
create mode 100644 hw/display/virtio-vga.h
create mode 100644 include/hw/virtio/virtio-gpu-bswap.h
create mode 100644 include/hw/virtio/virtio-gpu-pci.h
create mode 100644 include/hw/virtio/virtio-gpu-pixman.h
create mode 100644 contrib/vhost-user-gpu/main.c
create mode 100644 contrib/vhost-user-gpu/virgl.c
create mode 100644 contrib/vhost-user-gpu/vugbm.c
create mode 100644 hw/display/vhost-user-gpu-pci.c
create mode 100644 hw/display/vhost-user-gpu.c
create mode 100644 hw/display/vhost-user-vga.c
create mode 100644 hw/display/virtio-gpu-base.c
create mode 100644 contrib/vhost-user-gpu/50-qemu-gpu.json.in
create mode 100644 contrib/vhost-user-gpu/Makefile.objs
create mode 100644 docs/interop/vhost-user-gpu.rst
[Qemu-devel] [PATCH v9 0/9] Add vhost-user-gpu
Posted by Marc-André Lureau 4 years, 11 months ago
Hi,

vhost-user allows to drive a virtio device in a seperate
process. After vhost-user-net, we have seen
vhost-user-{scsi,blk,crypto,input} added more recently.

This series, initially proposed ~3 years ago, time flies
(https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg01905.html)
contributes with vhost-user-gpu.

You may start a vhost-user-gpu with virgl rendering in a separate
process like this:

$ ./vhost-user-gpu --virgl -s vgpu.sock &
$ qemu...
  -chardev socket,id=chr,path=vgpu.sock
  -device vhost-user-vga,chardev=chr

v9:
 - fix compilation with --disable-opengl
 - add "spice-app: fix running when !CONFIG_OPENGL"
 - fix kernel warning when virgl is disabled

v8:
 - document protocol bitmaps format, with pixman format
 - rebased, fixing a few conflicts

v7:
 - add "framed" replies to the vhost-user-gpu protocol
 - use GBM library instead of drm-vendor APIs
 - added "virtio-gpu: add a pixman helper header"

v6:
 - do not install vhost-user-input
 - install vhost-user-gpu and json file following the spec
 - fix the build when drm-intel-devel missing
 - rebase (& resend without already applied patches)

v5:
 - remove user-creatable version of vhost-user-backend
 - remove optinal management of sub-process in vhost-user-backend
 - removed daemonize/pid code
 - drop introduction of new input & gpu messages for PCI config space
   handling, instead use VHOST_USER_PROTOCOL_F_CONFIG
 - plain mem & udmabuf fallback for 2d rendering
 - rebased, kconfig-ify, rst-ify

Marc-André Lureau (9):
  vhost-user: add vhost_user_gpu_set_socket()
  virtio-gpu: add bswap helpers header
  virtio-gpu: add a pixman helper header
  util: compile drm.o on Linux
  contrib: add vhost-user-gpu
  spice-app: fix running when !CONFIG_OPENGL
  virtio-gpu: split virtio-gpu, introduce virtio-gpu-base
  virtio-gpu: split virtio-gpu-pci & virtio-vga
  hw/display: add vhost-user-vga & gpu-pci

 configure                                  |   17 +
 contrib/libvhost-user/libvhost-user.h      |    1 +
 contrib/vhost-user-gpu/virgl.h             |   25 +
 contrib/vhost-user-gpu/vugbm.h             |   67 ++
 contrib/vhost-user-gpu/vugpu.h             |  177 +++
 hw/display/virtio-vga.h                    |   32 +
 include/hw/virtio/vhost-backend.h          |    2 +
 include/hw/virtio/virtio-gpu-bswap.h       |   61 +
 include/hw/virtio/virtio-gpu-pci.h         |   40 +
 include/hw/virtio/virtio-gpu-pixman.h      |   45 +
 include/hw/virtio/virtio-gpu.h             |   92 +-
 contrib/libvhost-user/libvhost-user.c      |    1 +
 contrib/vhost-user-gpu/main.c              | 1185 ++++++++++++++++++++
 contrib/vhost-user-gpu/virgl.c             |  579 ++++++++++
 contrib/vhost-user-gpu/vugbm.c             |  328 ++++++
 hw/display/vhost-user-gpu-pci.c            |   51 +
 hw/display/vhost-user-gpu.c                |  607 ++++++++++
 hw/display/vhost-user-vga.c                |   52 +
 hw/display/virtio-gpu-3d.c                 |   49 +-
 hw/display/virtio-gpu-base.c               |  268 +++++
 hw/display/virtio-gpu-pci.c                |   55 +-
 hw/display/virtio-gpu.c                    |  448 ++------
 hw/display/virtio-vga.c                    |  138 +--
 hw/virtio/vhost-user.c                     |   11 +
 ui/spice-app.c                             |    3 +-
 vl.c                                       |    1 +
 MAINTAINERS                                |   10 +-
 Makefile                                   |   24 +-
 Makefile.objs                              |    1 +
 contrib/vhost-user-gpu/50-qemu-gpu.json.in |    5 +
 contrib/vhost-user-gpu/Makefile.objs       |   10 +
 docs/interop/index.rst                     |    1 +
 docs/interop/vhost-user-gpu.rst            |  242 ++++
 docs/interop/vhost-user.rst                |    9 +
 hw/display/Kconfig                         |   10 +
 hw/display/Makefile.objs                   |    5 +-
 rules.mak                                  |    9 +-
 util/Makefile.objs                         |    2 +-
 38 files changed, 4176 insertions(+), 487 deletions(-)
 create mode 100644 contrib/vhost-user-gpu/virgl.h
 create mode 100644 contrib/vhost-user-gpu/vugbm.h
 create mode 100644 contrib/vhost-user-gpu/vugpu.h
 create mode 100644 hw/display/virtio-vga.h
 create mode 100644 include/hw/virtio/virtio-gpu-bswap.h
 create mode 100644 include/hw/virtio/virtio-gpu-pci.h
 create mode 100644 include/hw/virtio/virtio-gpu-pixman.h
 create mode 100644 contrib/vhost-user-gpu/main.c
 create mode 100644 contrib/vhost-user-gpu/virgl.c
 create mode 100644 contrib/vhost-user-gpu/vugbm.c
 create mode 100644 hw/display/vhost-user-gpu-pci.c
 create mode 100644 hw/display/vhost-user-gpu.c
 create mode 100644 hw/display/vhost-user-vga.c
 create mode 100644 hw/display/virtio-gpu-base.c
 create mode 100644 contrib/vhost-user-gpu/50-qemu-gpu.json.in
 create mode 100644 contrib/vhost-user-gpu/Makefile.objs
 create mode 100644 docs/interop/vhost-user-gpu.rst

-- 
2.22.0.rc1.1.g079e7d2849.dirty


Re: [Qemu-devel] [PATCH v9 0/9] Add vhost-user-gpu
Posted by no-reply@patchew.org 4 years, 11 months ago
Patchew URL: https://patchew.org/QEMU/20190524130946.31736-1-marcandre.lureau@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20190524130946.31736-1-marcandre.lureau@redhat.com
Type: series
Subject: [Qemu-devel] [PATCH v9 0/9] Add vhost-user-gpu

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20190524130946.31736-1-marcandre.lureau@redhat.com -> patchew/20190524130946.31736-1-marcandre.lureau@redhat.com
Switched to a new branch 'test'
74f9775772 hw/display: add vhost-user-vga & gpu-pci
395dc9057d virtio-gpu: split virtio-gpu-pci & virtio-vga
6209c5c2e9 virtio-gpu: split virtio-gpu, introduce virtio-gpu-base
fd96c2f654 spice-app: fix running when !CONFIG_OPENGL
d27da5df7c contrib: add vhost-user-gpu
de23c3a8a2 util: compile drm.o on Linux
212119c374 virtio-gpu: add a pixman helper header
c30b326a26 virtio-gpu: add bswap helpers header
0b20688864 vhost-user: add vhost_user_gpu_set_socket()

=== OUTPUT BEGIN ===
1/9 Checking commit 0b2068886465 (vhost-user: add vhost_user_gpu_set_socket())
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#73: 
new file mode 100644

total: 0 errors, 1 warnings, 316 lines checked

Patch 1/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/9 Checking commit c30b326a26a4 (virtio-gpu: add bswap helpers header)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#74: 
new file mode 100644

total: 0 errors, 1 warnings, 116 lines checked

Patch 2/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/9 Checking commit 212119c37470 (virtio-gpu: add a pixman helper header)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#75: 
new file mode 100644

total: 0 errors, 1 warnings, 98 lines checked

Patch 3/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
4/9 Checking commit de23c3a8a214 (util: compile drm.o on Linux)
5/9 Checking commit d27da5df7c4d (contrib: add vhost-user-gpu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#152: 
new file mode 100644

total: 0 errors, 1 warnings, 2500 lines checked

Patch 5/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/9 Checking commit fd96c2f65457 (spice-app: fix running when !CONFIG_OPENGL)
7/9 Checking commit 6209c5c2e925 (virtio-gpu: split virtio-gpu, introduce virtio-gpu-base)
WARNING: Block comments use a leading /* on a separate line
#100: FILE: hw/display/virtio-gpu-3d.c:181:
+            info.flags & 1 /* FIXME: Y_0_TOP */,

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#188: 
new file mode 100644

ERROR: Macros with complex values should be enclosed in parenthesis
#1256: FILE: include/hw/virtio/virtio-gpu.h:122:
+#define VIRTIO_GPU_BASE_PROPERTIES(_state, _conf)                       \
+    DEFINE_PROP_UINT32("max_outputs", _state, _conf.max_outputs, 1),    \
+    DEFINE_PROP_BIT("edid", _state, _conf.flags, \
+                    VIRTIO_GPU_FLAG_EDID_ENABLED, false), \
+    DEFINE_PROP_UINT32("xres", _state, _conf.xres, 1024), \
+    DEFINE_PROP_UINT32("yres", _state, _conf.yres, 768)

total: 1 errors, 2 warnings, 1187 lines checked

Patch 7/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

8/9 Checking commit 395dc9057d49 (virtio-gpu: split virtio-gpu-pci & virtio-vga)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#392: 
new file mode 100644

total: 0 errors, 1 warnings, 390 lines checked

Patch 8/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/9 Checking commit 74f97757727f (hw/display: add vhost-user-vga & gpu-pci)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#56: 
new file mode 100644

ERROR: Macros with complex values should be enclosed in parenthesis
#864: FILE: include/hw/virtio/virtio-gpu-pci.h:35:
+#define DEFINE_VIRTIO_GPU_PCI_PROPERTIES(_state)                \
+    DEFINE_PROP_BIT("ioeventfd", _state, flags,                 \
+                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, false),  \
+        DEFINE_PROP_UINT32("vectors", _state, nvectors, 3)

total: 1 errors, 1 warnings, 853 lines checked

Patch 9/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190524130946.31736-1-marcandre.lureau@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com