[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC 04/10] virtio: Add virtio_queue_host_notifier_status
From: |
Eugenio Pérez |
Subject: |
[RFC 04/10] virtio: Add virtio_queue_host_notifier_status |
Date: |
Fri, 29 Jan 2021 21:54:09 +0100 |
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
include/hw/virtio/virtio.h | 1 +
hw/virtio/virtio.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 9013c03424..c5fcd9b169 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -321,6 +321,7 @@ void virtio_device_release_ioeventfd(VirtIODevice *vdev);
bool virtio_device_ioeventfd_enabled(VirtIODevice *vdev);
EventNotifier *virtio_queue_get_host_notifier(VirtQueue *vq);
void virtio_queue_set_host_notifier_enabled(VirtQueue *vq, bool enabled);
+bool virtio_queue_host_notifier_status(const VirtQueue *vq);
void virtio_queue_host_notifier_read(EventNotifier *n);
void virtio_queue_aio_set_host_notifier_handler(VirtQueue *vq, AioContext *ctx,
VirtIOHandleAIOOutput
handle_output);
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 3d14b0ef74..fdf37d8e48 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -3613,6 +3613,11 @@ EventNotifier *virtio_queue_get_host_notifier(VirtQueue
*vq)
return &vq->host_notifier;
}
+bool virtio_queue_host_notifier_status(const VirtQueue *vq)
+{
+ return vq->host_notifier_enabled;
+}
+
void virtio_queue_set_host_notifier_enabled(VirtQueue *vq, bool enabled)
{
vq->host_notifier_enabled = enabled;
--
2.27.0
- [RFC 00/10] vDPA shadow virtqueue - notifications forwarding, Eugenio Pérez, 2021/01/29
- [RFC 01/10] virtio: Add virtqueue_set_handler, Eugenio Pérez, 2021/01/29
- [RFC 02/10] virtio: Add set_vq_handler, Eugenio Pérez, 2021/01/29
- [RFC 03/10] virtio: Add virtio_queue_get_idx, Eugenio Pérez, 2021/01/29
- [RFC 04/10] virtio: Add virtio_queue_host_notifier_status,
Eugenio Pérez <=
- [RFC 05/10] vhost: Add vhost_dev_from_virtio, Eugenio Pérez, 2021/01/29
- [RFC 07/10] vhost: Add VhostShadowVirtqueue, Eugenio Pérez, 2021/01/29
- [RFC 06/10] vhost: Save masked_notifier state, Eugenio Pérez, 2021/01/29
- [RFC 08/10] vhost: Add x-vhost-enable-shadow-vq qmp, Eugenio Pérez, 2021/01/29
- [RFC 10/10] vhost: Route host->guest notification through shadow virtqueue, Eugenio Pérez, 2021/01/29
- [RFC 09/10] vhost: Route guest->host notification through shadow virtqueue, Eugenio Pérez, 2021/01/29