Skip to contentSkip to conversation

vhost-user: define conventions for vhost-user backends

PATCH In review Marc-André Lureau 3 participants 3 messages Nov 7, 2018 – Nov 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 vhost-user: define conventions for vhost-user backends

As discussed during "[PATCH v4 00/29] vhost-user for input & GPU" review, let's define a common set of backend conventions to help with management layer implementation, and interoperability.

v2:
- use a vhost-user.json schema to discover backends and describe capability format
- drop --pidfile
- add some notes about daemonizing & stdin/out/err

Cc Gerd Hoffmann <[email protected]>
Cc Daniel P. Berrangé <[email protected]>
Cc Changpeng Liu <[email protected]>
Cc Dr. David Alan Gilbert <[email protected]>
Cc Felipe Franciosi <[email protected]>
Cc Gonglei <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
Cc Victor Kaplansky <[email protected]>
---
 MAINTAINERS                  |   1 +
 docs/interop/vhost-user.json | 219 +++++++++++++++++++++++++++++++++++
 docs/interop/vhost-user.txt  | 101 +++++++++++++++-
 3 files changed, 319 insertions(+), 2 deletions(-)
 create mode 100644 docs/interop/vhost-user.json
MAINTAINERS +1 -0
index bd2dff7827..58082c6d92 100644
@@ -1238,6 +1238,7 @@ vhost
 M: Michael S. Tsirkin <[email protected]>
 S: Supported
 F: hw/*/*vhost*
+F: docs/interop/vhost-user.json
 F: docs/interop/vhost-user.txt
 F: backends/vhost-user.c
 F: include/sysemu/vhost-user-backend.h
docs/interop/vhost-user.json new file +219 -0

219 lines not on this page · raw message

docs/interop/vhost-user.txt +99 -2

110 lines not on this page · raw message

Signature · 1 line
2.19.1.708.g4ede3d42df
Reviewed-by on v2 1/1
#1 lore raw
Quoted 58 lines · Marc-André Lureau

As discussed during "[PATCH v4 00/29] vhost-user for input & GPU" review, let's define a common set of backend conventions to help with management layer implementation, and interoperability.

v2:
- use a vhost-user.json schema to discover backends and describe capability format
- drop --pidfile
- add some notes about daemonizing & stdin/out/err

Cc Gerd Hoffmann <[email protected]>
Cc Daniel P. Berrangé <[email protected]>
Cc Changpeng Liu <[email protected]>
Cc Dr. David Alan Gilbert <[email protected]>
Cc Felipe Franciosi <[email protected]>
Cc Gonglei <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
Cc Victor Kaplansky <[email protected]>
---
 MAINTAINERS                  |   1 +
 docs/interop/vhost-user.json | 219 +++++++++++++++++++++++++++++++++++
 docs/interop/vhost-user.txt  | 101 +++++++++++++++-
 3 files changed, 319 insertions(+), 2 deletions(-)
 create mode 100644 docs/interop/vhost-user.json
docs/interop/vhost-user.json new file +23 -0
new file mode 100644
index 0000000000..91b5bf499e
@@ -0,0 +1,219 @@
+# -*- Mode: Python -*-
+#
+# Copyright (C) 2018 Red Hat, Inc.
+#
+# Authors:
+#  Marc-André Lureau <[email protected]>
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or
+# later. See the COPYING file in the top-level directory.
+
+##
+# = vhost user backend discovery & capabilities
+##
+
+##
+# @VHostUserBackendType:
+#
+# List the various vhost user backend types.
+#
+# @net: virtio net
+# @block: virtio block
+# @console: virtio console
+# @rng: virtio rng

docs/interop/vhost-user.json line 33

Quoted 10 lines
docs/interop/vhost-user.json new file +10 -0
+# @balloon: virtio balloon
+# @rpmsg: virtio remote processor messaging
+# @scsi: virtio scsi
+# @9p: 9p virtio console
+# @rproc-serial: virtio remoteproc serial link
+# @caif: virtio caif
+# @gpu: virtio gpu
+# @input: virtio input
+# @vsock: virtio vsock transport
+# @crypto: virtio crypto

Is it possible to actually use an external backend process with all these yet ? If not, perhaps we should only start with the backends that will be usable immediately ?

docs/interop/vhost-user.json line 42

Quoted 9 lines
docs/interop/vhost-user.json new file +9 -0
+#
+# Since: 3.2
+##
+{
+  'enum': 'VHostUserBackendType',
+  'data': [ 'net', 'block', 'console', 'rng', 'balloon', 'rpmsg',
+            'scsi', '9p', 'rproc-serial', 'caif', 'gpu', 'input', 'vsock',
+            'crypto' ]
+}

Regardless of the answer to the above question,

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#2 lore raw

Hi

Quoted 66 lines · Daniel P. Berrangé
Quoted 64 lines · Marc-André Lureau

As discussed during "[PATCH v4 00/29] vhost-user for input & GPU" review, let's define a common set of backend conventions to help with management layer implementation, and interoperability.

v2:
- use a vhost-user.json schema to discover backends and describe capability format
- drop --pidfile
- add some notes about daemonizing & stdin/out/err

Cc Gerd Hoffmann <[email protected]>
Cc Daniel P. Berrangé <[email protected]>
Cc Changpeng Liu <[email protected]>
Cc Dr. David Alan Gilbert <[email protected]>
Cc Felipe Franciosi <[email protected]>
Cc Gonglei <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
Cc Victor Kaplansky <[email protected]>
---
 MAINTAINERS                  |   1 +
 docs/interop/vhost-user.json | 219 +++++++++++++++++++++++++++++++++++
 docs/interop/vhost-user.txt  | 101 +++++++++++++++-
 3 files changed, 319 insertions(+), 2 deletions(-)
 create mode 100644 docs/interop/vhost-user.json
docs/interop/vhost-user.json new file +29 -0
new file mode 100644
index 0000000000..91b5bf499e
@@ -0,0 +1,219 @@
+# -*- Mode: Python -*-
+#
+# Copyright (C) 2018 Red Hat, Inc.
+#
+# Authors:
+#  Marc-André Lureau <[email protected]>
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or
+# later. See the COPYING file in the top-level directory.
+
+##
+# = vhost user backend discovery & capabilities
+##
+
+##
+# @VHostUserBackendType:
+#
+# List the various vhost user backend types.
+#
+# @net: virtio net
+# @block: virtio block
+# @console: virtio console
+# @rng: virtio rng
+# @balloon: virtio balloon
+# @rpmsg: virtio remote processor messaging
+# @scsi: virtio scsi
+# @9p: 9p virtio console
+# @rproc-serial: virtio remoteproc serial link
+# @caif: virtio caif
Quoted 8 lines

docs/interop/vhost-user.json line 33

Quoted 4 lines
docs/interop/vhost-user.json new file +4 -0
+# @gpu: virtio gpu
+# @input: virtio input
+# @vsock: virtio vsock transport
+# @crypto: virtio crypto

Is it possible to actually use an external backend process with all these yet ? If not, perhaps we should only start with the backends that will be usable immediately ?

No, most of them don't have vhost-user support in qemu. Nevertheless, I think the vhost-user spec should cover existing virtio devices, and not be limited to what qemu can do today, for interoperability.

Quoted 13 lines

docs/interop/vhost-user.json line 42

Quoted 10 lines
docs/interop/vhost-user.json new file +9 -0
+#
+# Since: 3.2
+##
+{
+  'enum': 'VHostUserBackendType',
+  'data': [ 'net', 'block', 'console', 'rng', 'balloon', 'rpmsg',
+            'scsi', '9p', 'rproc-serial', 'caif', 'gpu', 'input', 'vsock',
+            'crypto' ]
+}

Regardless of the answer to the above question,

Quoted 1 line

thanks

Quoted 8 lines

Regards,
Daniel
--

|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Signature · 1 line
Marc-André Lureau