]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio: Add queue interface to restore avail index from vring used index
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 16 Nov 2017 18:48:34 +0000 (19:48 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 6 Dec 2017 15:55:16 +0000 (09:55 -0600)
commit059422ddbc9e3b7fbe54a6d87b9ac0b329bb16b9
tree75232d7bfd8d4af4a9caa63f46d99ce6ab1d10d5
parentd6c99e8ff5c7e46ced686c7773cd9c5faf3e844e
virtio: Add queue interface to restore avail index from vring used index

In case of backend crash, it is not possible to restore internal
avail index from the backend value as vhost_get_vring_base
callback fails.

This patch provides a new interface to restore internal avail index
from the vring used index, as done by some vhost-user backend on
reconnection.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 2d4ba6cc741df15df6fbb4feaa706a02e103083a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio/virtio.c
include/hw/virtio/virtio.h