qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFT 1/4] virtio-bus: introduce a new method for querying t


From: Jason Wang
Subject: [Qemu-devel] [RFT 1/4] virtio-bus: introduce a new method for querying the queue status
Date: Fri, 22 Mar 2019 17:28:03 +0800

Sometime we need to check whether a queue is enabled, e.g for vhost,
we don't want to start the backend for the virtqueues that is not
enabled. So introduce a new method to do this.

Signed-off-by: Jason Wang <address@hidden>
---
 include/hw/virtio/virtio-bus.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/hw/virtio/virtio-bus.h b/include/hw/virtio/virtio-bus.h
index 7fec9dc929..db20fecf13 100644
--- a/include/hw/virtio/virtio-bus.h
+++ b/include/hw/virtio/virtio-bus.h
@@ -84,6 +84,10 @@ typedef struct VirtioBusClass {
      */
     int (*ioeventfd_assign)(DeviceState *d, EventNotifier *notifier,
                             int n, bool assign);
+    /*
+     * is the queue enabled?
+     */
+    bool (*queue_enabled)(DeviceState *d, int n);
     /*
      * Does the transport have variable vring alignment?
      * (ie can it ever call virtio_queue_set_align()?)
-- 
2.19.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]