[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
- [Qemu-devel] [RFT 0/4] Don't start virtqueues that are not enabled for vhost, Jason Wang, 2019/03/22
- [Qemu-devel] [RFT 1/4] virtio-bus: introduce a new method for querying the queue status,
Jason Wang <=
- [Qemu-devel] [RFT 2/4] virtio-pci: set enabled for legacy device, Jason Wang, 2019/03/22
- [Qemu-devel] [RFT 3/4] virtio-pci: implement queue_enabled, Jason Wang, 2019/03/22
- [Qemu-devel] [RFT 4/4] vhost_net: don't start vhost for the virtqueue that is not enabled, Jason Wang, 2019/03/22
- Re: [Qemu-devel] [RFT 0/4] Don't start virtqueues that are not enabled for vhost, no-reply, 2019/03/22
- Re: [Qemu-devel] [RFT 0/4] Don't start virtqueues that are not enabled for vhost, no-reply, 2019/03/22
- Re: [Qemu-devel] [RFT 0/4] Don't start virtqueues that are not enabled for vhost, Yuri Benditovich, 2019/03/24