summary refs log tree commit diff stats
path: root/hw/virtio/vhost-shadow-virtqueue.h
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2022-03-14 18:34:43 +0100
committerJason Wang <jasowang@redhat.com>2022-03-15 13:57:44 +0800
commita8ac88585da1a3ae9c48bfd9e04430e895dc912d (patch)
tree468766babbd959792a32169e2bd68fcaac022a65 /hw/virtio/vhost-shadow-virtqueue.h
parentdff4426fa6562b6837ddc662a61836ae11ac4fae (diff)
downloadfocaccia-qemu-a8ac88585da1a3ae9c48bfd9e04430e895dc912d.tar.gz
focaccia-qemu-a8ac88585da1a3ae9c48bfd9e04430e895dc912d.zip
vhost: Add Shadow VirtQueue call forwarding capabilities
This will make qemu aware of the device used buffers, allowing it to
write the guest memory with its contents if needed.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/virtio/vhost-shadow-virtqueue.h b/hw/virtio/vhost-shadow-virtqueue.h
index 1cbc87d5d8..cbc5213579 100644
--- a/hw/virtio/vhost-shadow-virtqueue.h
+++ b/hw/virtio/vhost-shadow-virtqueue.h
@@ -28,9 +28,13 @@ typedef struct VhostShadowVirtqueue {
      * So shadow virtqueue must not clean it, or we would lose VirtQueue one.
      */
     EventNotifier svq_kick;
+
+    /* Guest's call notifier, where the SVQ calls guest. */
+    EventNotifier svq_call;
 } VhostShadowVirtqueue;
 
 void vhost_svq_set_svq_kick_fd(VhostShadowVirtqueue *svq, int svq_kick_fd);
+void vhost_svq_set_svq_call_fd(VhostShadowVirtqueue *svq, int call_fd);
 
 void vhost_svq_stop(VhostShadowVirtqueue *svq);