[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v5 05/26] vhost: Add x-vhost-set-shadow-vq qmp
From: |
Eugenio Pérez |
Subject: |
[RFC PATCH v5 05/26] vhost: Add x-vhost-set-shadow-vq qmp |
Date: |
Fri, 29 Oct 2021 20:35:04 +0200 |
Command to set shadow virtqueue mode.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
qapi/net.json | 22 ++++++++++++++++++++++
net/vhost-vdpa.c | 6 ++++++
2 files changed, 28 insertions(+)
diff --git a/qapi/net.json b/qapi/net.json
index 7fab2e7cd8..b191b6787b 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -79,6 +79,28 @@
{ 'command': 'netdev_del', 'data': {'id': 'str'},
'allow-preconfig': true }
+##
+# @x-vhost-set-shadow-vq:
+#
+# Use vhost shadow virtqueue.
+#
+# @name: the device name of the VirtIO device
+#
+# @set: true to use the alternate shadow VQ notifications
+#
+# Returns: Always error, since SVQ is not implemented at the moment.
+#
+# Since: 6.2
+#
+# Example:
+#
+# -> { "execute": "x-vhost-set-shadow-vq",
+# "arguments": { "name": "virtio-net", "set": false } }
+#
+##
+{ 'command': 'x-vhost-set-shadow-vq', 'data': {'name': 'str', 'set': 'bool'},
+ 'if': 'CONFIG_VHOST_VDPA' }
+
##
# @NetLegacyNicOptions:
#
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 49ab322511..3b360da27d 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -18,6 +18,7 @@
#include "qemu/error-report.h"
#include "qemu/option.h"
#include "qapi/error.h"
+#include "qapi/qapi-commands-net.h"
#include <linux/vhost.h>
#include <sys/ioctl.h>
#include <err.h>
@@ -301,3 +302,8 @@ err:
return -1;
}
+
+void qmp_x_vhost_set_shadow_vq(const char *name, bool set, Error **errp)
+{
+ error_setg(errp, "Shadow virtqueue still not implemented");
+}
--
2.27.0
- [RFC PATCH v5 00/26] vDPA shadow virtqueue, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 01/26] util: Make some iova_tree parameters const, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 02/26] vhost: Fix last queue index of devices with no cvq, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 03/26] virtio: Add VIRTIO_F_QUEUE_STATE, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 04/26] virtio-net: Honor VIRTIO_CONFIG_S_DEVICE_STOPPED, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 05/26] vhost: Add x-vhost-set-shadow-vq qmp,
Eugenio Pérez <=
- [RFC PATCH v5 06/26] vhost: Add VhostShadowVirtqueue, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 07/26] vdpa: Save kick_fd in vhost-vdpa, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 08/26] vdpa: Add vhost_svq_get_dev_kick_notifier, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 09/26] vdpa: Add vhost_svq_set_svq_kick_fd, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 10/26] vhost: Add Shadow VirtQueue kick forwarding capabilities, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 11/26] vhost: Handle host notifiers in SVQ, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 12/26] vhost: Route guest->host notification through shadow virtqueue, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 13/26] Add vhost_svq_get_svq_call_notifier, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 14/26] Add vhost_svq_set_guest_call_notifier, Eugenio Pérez, 2021/10/29
- [RFC PATCH v5 15/26] vdpa: Save call_fd in vhost-vdpa, Eugenio Pérez, 2021/10/29