]> www.infradead.org Git - users/dwmw2/qemu.git/commit
vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flush
authorEugenio Pérez <eperezma@redhat.com>
Tue, 23 Aug 2022 18:30:29 +0000 (20:30 +0200)
committerJason Wang <jasowang@redhat.com>
Fri, 2 Sep 2022 02:22:39 +0000 (10:22 +0800)
commitd368c0b052ad95d3bf4fcc5a5d25715a35c91d4b
tree154152cd2de62ba32795c9f59f6415aa8eee2aa4
parent9e193cec5db949e4001070442a2f7de7042ef09b
vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flush

Since QEMU will be able to inject new elements on CVQ to restore the
state, we need not to depend on a VirtQueueElement to know if a new
element has been used by the device or not. Instead of check that, check
if there are new elements only using used idx on vhost_svq_flush.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/virtio/vhost-shadow-virtqueue.c