qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 07/24] virtio-pci: support queue enable


From: Jason Wang
Subject: Re: [PATCH v2 07/24] virtio-pci: support queue enable
Date: Tue, 23 Aug 2022 15:44:30 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0


在 2022/8/16 09:06, Kangjie Xu 写道:
PCI devices support vq enable.


Nit: it might be "support device specific vq enable"



Based on this function, the driver can re-enable the virtqueue after the
virtqueue is reset.

Signed-off-by: Kangjie Xu <kangjie.xu@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
---
  hw/virtio/virtio-pci.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index ec8e92052f..3d560e45ad 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1335,6 +1335,7 @@ static void virtio_pci_common_write(void *opaque, hwaddr 
addr,
                         proxy->vqs[vdev->queue_sel].avail[0],
                         ((uint64_t)proxy->vqs[vdev->queue_sel].used[1]) << 32 |
                         proxy->vqs[vdev->queue_sel].used[0]);
+            virtio_queue_enable(vdev, vdev->queue_sel);
              proxy->vqs[vdev->queue_sel].enabled = 1;
              proxy->vqs[vdev->queue_sel].reset = 0;


Any reason we do it before the assignment of 1? It probably means the device specific method can't depend on virtio_queue_enabled()?

Thanks


          } else {




reply via email to

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