]> git.proxmox.com Git - mirror_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 S. Tsirkin <mst@redhat.com>
Fri, 1 Dec 2017 17:05:58 +0000 (19:05 +0200)
commit2d4ba6cc741df15df6fbb4feaa706a02e103083a
tree0310d3cc53bb9b9dc9472448155b2442b86f79c6
parent861fec459bb4db69123c3b320e1bad9585cdb524
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>
hw/virtio/virtio.c
include/hw/virtio/virtio.h