[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v4 05/20] vhost: Add x-vhost-enable-shadow-vq qmp
From: |
Eugenio Pérez |
Subject: |
[RFC PATCH v4 05/20] vhost: Add x-vhost-enable-shadow-vq qmp |
Date: |
Fri, 1 Oct 2021 09:05:48 +0200 |
Command to enable shadow virtqueue.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
qapi/net.json | 23 +++++++++++++++++++++++
hw/virtio/vhost-vdpa.c | 8 ++++++++
2 files changed, 31 insertions(+)
diff --git a/qapi/net.json b/qapi/net.json
index 7fab2e7cd8..a2c30fd455 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -79,6 +79,29 @@
{ 'command': 'netdev_del', 'data': {'id': 'str'},
'allow-preconfig': true }
+##
+# @x-vhost-enable-shadow-vq:
+#
+# Use vhost shadow virtqueue.
+#
+# @name: the device name of the VirtIO device
+#
+# @enable: 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-enable-shadow-vq",
+# "arguments": { "name": "virtio-net", "enable": false } }
+#
+##
+{ 'command': 'x-vhost-enable-shadow-vq',
+ 'data': {'name': 'str', 'enable': 'bool'},
+ 'if': 'defined(CONFIG_VHOST_KERNEL)' }
+
##
# @NetLegacyNicOptions:
#
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 4fa414feea..c63e311d7c 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -23,6 +23,8 @@
#include "cpu.h"
#include "trace.h"
#include "qemu-common.h"
+#include "qapi/qapi-commands-net.h"
+#include "qapi/error.h"
static bool vhost_vdpa_listener_skipped_section(MemoryRegionSection *section)
{
@@ -656,6 +658,12 @@ static bool vhost_vdpa_force_iommu(struct vhost_dev *dev)
return true;
}
+
+void qmp_x_vhost_enable_shadow_vq(const char *name, bool enable, Error **errp)
+{
+ error_setg(errp, "Shadow virtqueue still not implemented");
+}
+
const VhostOps vdpa_ops = {
.backend_type = VHOST_BACKEND_TYPE_VDPA,
.vhost_backend_init = vhost_vdpa_init,
--
2.27.0
- [RFC PATCH v4 00/20] vDPA shadow virtqueue, Eugenio Pérez, 2021/10/01
- [RFC PATCH v4 02/20] virtio-net: Honor VIRTIO_CONFIG_S_DEVICE_STOPPED, Eugenio Pérez, 2021/10/01
- [RFC PATCH v4 03/20] virtio: Add virtio_queue_is_host_notifier_enabled, Eugenio Pérez, 2021/10/01
- [RFC PATCH v4 04/20] vhost: Make vhost_virtqueue_{start,stop} public, Eugenio Pérez, 2021/10/01
- [RFC PATCH v4 01/20] virtio: Add VIRTIO_F_QUEUE_STATE, Eugenio Pérez, 2021/10/01
- [RFC PATCH v4 05/20] vhost: Add x-vhost-enable-shadow-vq qmp,
Eugenio Pérez <=
[RFC PATCH v4 06/20] vhost: Add VhostShadowVirtqueue, Eugenio Pérez, 2021/10/01
[RFC PATCH v4 07/20] vdpa: Register vdpa devices in a list, Eugenio Pérez, 2021/10/01
[RFC PATCH v4 08/20] vhost: Route guest->host notification through shadow virtqueue, Eugenio Pérez, 2021/10/01