On Mon, 31 Aug 2020 at 16:30, Jason Wang <jasowang@redhat.com> wrote:
This patch allows to initialize vhost-vdpa network backend with pre
opened vhost-vdpa file descriptor. This is useful for running
unprivileged qemu through libvirt.
Cc: Eric Blake <eblake@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
+++ b/qapi/net.json
@@ -442,12 +442,15 @@
# @queues: number of queues to be created for multiqueue vhost-vdpa
# (default: 1)
#
+# @fd: file descriptor of an already opened vhost-vdpa (since 5.2)
+#
# Since: 5.1
##
{ 'struct': 'NetdevVhostVDPAOptions',
'data': {
'*vhostdev': 'str',
- '*queues': 'int' } }
+ '*queues': 'int',
+ '*fd': 'str' } }
##
# @NetClientDriver:
--
2.20.1
I think the latest code supported this part.
you can pass a pre open file descriptor to it via the add-fd QMP
command to /dev/fdset/NNN, and then pass the string
"/dev/fdset/NNN" as vhostdev. so we don't need a special fd parameter here.