[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFT 2/4] virtio-pci: set enabled for legacy device
From: |
Jason Wang |
Subject: |
[Qemu-devel] [RFT 2/4] virtio-pci: set enabled for legacy device |
Date: |
Fri, 22 Mar 2019 17:28:04 +0800 |
We don't set enabled for legacy device, this turns out to be an issue
if we want to check it through vhost. So just simply set it when
setting pa of a virtqueue.
Signed-off-by: Jason Wang <address@hidden>
---
hw/virtio/virtio-pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index cb44e19b67..887ee2783c 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -306,8 +306,10 @@ static void virtio_ioport_write(void *opaque, uint32_t
addr, uint32_t val)
if (pa == 0) {
virtio_pci_reset(DEVICE(proxy));
}
- else
+ else {
virtio_queue_set_addr(vdev, vdev->queue_sel, pa);
+ proxy->vqs[vdev->queue_sel].enabled = 1;
+ }
break;
case VIRTIO_PCI_QUEUE_SEL:
if (val < VIRTIO_QUEUE_MAX)
--
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 <=
- [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