From: "Eugenio Pérez" <eperezma@redhat.com>
To: qemu-devel@nongnu.org
Cc: Parav Pandit <parav@mellanox.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
virtualization@lists.linux-foundation.org,
Harpreet Singh Anand <hanand@xilinx.com>,
Xiao W Wang <xiao.w.wang@intel.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Eli Cohen <eli@mellanox.com>,
Rob Miller <rob.miller@broadcom.com>,
Michael Lilja <ml@napatech.com>,
Jim Harford <jim.harford@broadcom.com>,
Stefano Garzarella <sgarzare@redhat.com>
Subject: [RFC v2 5/7] vhost: Add x-vhost-enable-shadow-vq qmp
Date: Tue, 9 Feb 2021 16:37:55 +0100 [thread overview]
Message-ID: <20210209153757.1653598-6-eperezma@redhat.com> (raw)
In-Reply-To: <20210209153757.1653598-1-eperezma@redhat.com>
Command to enable shadow virtqueue looks like:
{ "execute": "x-vhost-enable-shadow-vq", "arguments": { "name": "dev0", "enable": true } }
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
qapi/net.json | 22 ++++++++++++++++++++++
hw/virtio/vhost.c | 6 ++++++
2 files changed, 28 insertions(+)
diff --git a/qapi/net.json b/qapi/net.json
index c31748c87f..a1cdffb0f9 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -77,6 +77,28 @@
##
{ 'command': 'netdev_del', 'data': {'id': 'str'} }
+##
+# @x-vhost-enable-shadow-vq:
+#
+# Use vhost shadow virtqueue.
+#
+# @name: the device name of the virtual network adapter
+#
+# @enable: true to use he alternate shadow VQ notification path
+#
+# Returns: Error if failure, or 'no error' for success
+#
+# Since: 6.0
+#
+# Example:
+#
+# -> { "execute": "x-vhost-enable-shadow-vq", "arguments": {"enable": true} }
+#
+##
+{ 'command': 'x-vhost-enable-shadow-vq',
+ 'data': {'name': 'str', 'enable': 'bool'},
+ 'if': 'defined(CONFIG_VHOST_KERNEL)' }
+
##
# @NetLegacyNicOptions:
#
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 5d0c817b8f..8fbf14385e 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -15,6 +15,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "qapi/qapi-commands-net.h"
#include "hw/virtio/vhost.h"
#include "qemu/atomic.h"
#include "qemu/range.h"
@@ -1833,3 +1834,8 @@ int vhost_net_set_backend(struct vhost_dev *hdev,
return -1;
}
+
+void qmp_x_vhost_enable_shadow_vq(const char *name, bool enable, Error **errp)
+{
+ error_setg(errp, "Shadow virtqueue still not implemented");
+}
--
2.27.0
next prev parent reply other threads:[~2021-02-09 15:48 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 15:37 [RFC v2 0/7] vDPA shadow virtqueue - notifications forwarding Eugenio Pérez
2021-02-09 15:37 ` [RFC v2 1/7] vhost: Delete trailing dot in errpr_setg argument Eugenio Pérez
2021-02-09 16:24 ` Eric Blake
2021-02-09 18:11 ` Eugenio Perez Martin
2021-02-11 16:40 ` Stefano Garzarella
2021-02-09 15:37 ` [RFC v2 2/7] virtio: Add virtio_queue_host_notifier_status Eugenio Pérez
2021-02-17 12:41 ` Stefan Hajnoczi
2021-02-17 18:38 ` Eugenio Perez Martin
2021-02-09 15:37 ` [RFC v2 3/7] vhost: Save masked_notifier state Eugenio Pérez
2021-02-17 12:44 ` Stefan Hajnoczi
2021-02-09 15:37 ` [RFC v2 4/7] vhost: Add VhostShadowVirtqueue Eugenio Pérez
2021-02-17 13:01 ` Stefan Hajnoczi
2021-02-17 18:40 ` Eugenio Perez Martin
2021-02-09 15:37 ` Eugenio Pérez [this message]
2021-02-17 15:26 ` [RFC v2 5/7] vhost: Add x-vhost-enable-shadow-vq qmp Stefan Hajnoczi
2021-02-17 18:47 ` Eugenio Perez Martin
2021-02-18 18:35 ` Eugenio Perez Martin
2021-02-09 15:37 ` [RFC v2 6/7] vhost: Route guest->host notification through shadow virtqueue Eugenio Pérez
2021-02-17 16:56 ` Stefan Hajnoczi
2021-02-17 20:11 ` Eugenio Perez Martin
2021-02-09 15:37 ` [RFC v2 7/7] vhost: Route host->guest " Eugenio Pérez
2021-02-17 17:24 ` Stefan Hajnoczi
2021-02-17 19:13 ` Eugenio Perez Martin
2021-03-01 6:24 ` Jason Wang
2021-03-02 16:30 ` Eugenio Perez Martin
2021-02-09 15:54 ` [RFC v2 0/7] vDPA shadow virtqueue - notifications forwarding Eugenio Perez Martin
2021-02-11 11:12 ` no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210209153757.1653598-6-eperezma@redhat.com \
--to=eperezma@redhat.com \
--cc=armbru@redhat.com \
--cc=eli@mellanox.com \
--cc=hanand@xilinx.com \
--cc=jasowang@redhat.com \
--cc=jim.harford@broadcom.com \
--cc=ml@napatech.com \
--cc=mst@redhat.com \
--cc=parav@mellanox.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=rob.miller@broadcom.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xiao.w.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).