net: vhost stop updates virtio queue state

Make virtio queue suitable for push operation from qemu
after vhost was stopped.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Yuri Benditovich 2016-12-13 10:12:06 +02:00 committed by Michael S. Tsirkin
parent 312d3b3534
commit aa94d52142

View File

@ -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_set_last_avail_idx(vdev, idx, state.num);
} }
virtio_queue_invalidate_signalled_used(vdev, idx); 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 /* In the cross-endian case, we need to reset the vring endianness to
* native as legacy devices expect so by default. * native as legacy devices expect so by default.