diff options
Diffstat (limited to 'hw/virtio/vhost-shadow-virtqueue.h')
-rw-r--r-- | hw/virtio/vhost-shadow-virtqueue.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/virtio/vhost-shadow-virtqueue.h b/hw/virtio/vhost-shadow-virtqueue.h index f1519e3..1cbc87d 100644 --- a/hw/virtio/vhost-shadow-virtqueue.h +++ b/hw/virtio/vhost-shadow-virtqueue.h @@ -18,8 +18,22 @@ typedef struct VhostShadowVirtqueue { EventNotifier hdev_kick; /* Shadow call notifier, sent to vhost */ EventNotifier hdev_call; + + /* + * Borrowed virtqueue's guest to host notifier. To borrow it in this event + * notifier allows to recover the VhostShadowVirtqueue from the event loop + * easily. If we use the VirtQueue's one, we don't have an easy way to + * retrieve VhostShadowVirtqueue. + * + * So shadow virtqueue must not clean it, or we would lose VirtQueue one. + */ + EventNotifier svq_kick; } VhostShadowVirtqueue; +void vhost_svq_set_svq_kick_fd(VhostShadowVirtqueue *svq, int svq_kick_fd); + +void vhost_svq_stop(VhostShadowVirtqueue *svq); + VhostShadowVirtqueue *vhost_svq_new(void); void vhost_svq_free(gpointer vq); |