[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFT 3/4] virtio-pci: implement queue_enabled
From: |
Jason Wang |
Subject: |
[Qemu-devel] [RFT 3/4] virtio-pci: implement queue_enabled |
Date: |
Fri, 22 Mar 2019 17:28:05 +0800 |
Signed-off-by: Jason Wang <address@hidden>
---
hw/virtio/virtio-pci.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 887ee2783c..8bce42ff6f 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1094,6 +1094,13 @@ static AddressSpace *virtio_pci_get_dma_as(DeviceState
*d)
return pci_get_address_space(dev);
}
+static bool virtio_pci_queue_enabled(DeviceState *d, int n)
+{
+ VirtIOPCIProxy *proxy = VIRTIO_PCI(d);
+
+ return proxy->vqs[n].enabled;
+}
+
static int virtio_pci_add_mem_cap(VirtIOPCIProxy *proxy,
struct virtio_pci_cap *cap)
{
@@ -2037,6 +2044,7 @@ static void virtio_pci_bus_class_init(ObjectClass *klass,
void *data)
k->ioeventfd_enabled = virtio_pci_ioeventfd_enabled;
k->ioeventfd_assign = virtio_pci_ioeventfd_assign;
k->get_dma_as = virtio_pci_get_dma_as;
+ k->queue_enabled = virtio_pci_queue_enabled;
}
static const TypeInfo virtio_pci_bus_info = {
--
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, 2019/03/22
- [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 <=
- [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