From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQpAg-00084z-3r for qemu-devel@nongnu.org; Tue, 10 Jan 2017 00:40:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cQpAc-0005ou-0Q for qemu-devel@nongnu.org; Tue, 10 Jan 2017 00:40:34 -0500 Received: from mail.kernel.org ([198.145.29.136]:48316) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cQpAb-0005oN-QM for qemu-devel@nongnu.org; Tue, 10 Jan 2017 00:40:29 -0500 Date: Tue, 10 Jan 2017 07:40:25 +0200 From: "Michael S. Tsirkin" Message-ID: <1484026704-28027-27-git-send-email-mst@redhat.com> References: <1484026704-28027-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1484026704-28027-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 26/41] net: vhost stop updates virtio queue state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Yuri Benditovich From: Yuri Benditovich Make virtio queue suitable for push operation from qemu after vhost was stopped. Signed-off-by: Yuri Benditovich Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost.c | 1 + 1 file changed, 1 insertion(+) 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. -- MST