aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/vhost-shadow-virtqueue.h
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2022-07-20 08:59:34 +0200
committerJason Wang <jasowang@redhat.com>2022-07-20 16:58:08 +0800
commit9e87868fcaf5785c8e1490c290505fa32305ff91 (patch)
tree0d35b501b218cf22d33880bfb0c536d83c8ff99b /hw/virtio/vhost-shadow-virtqueue.h
parent1f46ae65d85f677b660bda46685dd3e94885a7cb (diff)
downloadqemu-9e87868fcaf5785c8e1490c290505fa32305ff91.zip
qemu-9e87868fcaf5785c8e1490c290505fa32305ff91.tar.gz
qemu-9e87868fcaf5785c8e1490c290505fa32305ff91.tar.bz2
vhost: Add SVQDescState
This will allow SVQ to add context to the different queue elements. This patch only store the actual element, no functional change intended. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/virtio/vhost-shadow-virtqueue.h')
-rw-r--r--hw/virtio/vhost-shadow-virtqueue.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/virtio/vhost-shadow-virtqueue.h b/hw/virtio/vhost-shadow-virtqueue.h
index c132c99..d646c35 100644
--- a/hw/virtio/vhost-shadow-virtqueue.h
+++ b/hw/virtio/vhost-shadow-virtqueue.h
@@ -15,6 +15,10 @@
#include "standard-headers/linux/vhost_types.h"
#include "hw/virtio/vhost-iova-tree.h"
+typedef struct SVQDescState {
+ VirtQueueElement *elem;
+} SVQDescState;
+
/* Shadow virtqueue to relay notifications */
typedef struct VhostShadowVirtqueue {
/* Shadow vring */
@@ -47,8 +51,8 @@ typedef struct VhostShadowVirtqueue {
/* IOVA mapping */
VhostIOVATree *iova_tree;
- /* Map for use the guest's descriptors */
- VirtQueueElement **ring_id_maps;
+ /* SVQ vring descriptors state */
+ SVQDescState *desc_state;
/* Next VirtQueue element that guest made available */
VirtQueueElement *next_guest_avail_elem;