diff mbox

[v3,2/4] net: vhost stop updates virtio queue state

Message ID 1481616728-148412-3-git-send-email-yuri.benditovich@daynix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yuri Benditovich Dec. 13, 2016, 8:12 a.m. UTC
Make virtio queue suitable for push operation from qemu
after vhost was stopped.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
---
 hw/virtio/vhost.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index f7f7023..d396b22 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -993,6 +993,7 @@  static void vhost_virtqueue_stop(struct vhost_dev *dev,
         virtio_queue_set_last_avail_idx(vdev, idx, state.num);
     }
     virtio_queue_invalidate_signalled_used(vdev, idx);
+    virtio_queue_update_used_idx(vdev, idx);
 
     /* In the cross-endian case, we need to reset the vring endianness to
      * native as legacy devices expect so by default.