mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
virtio: check for vring setup in virtio_queue_empty
If the vring has not been set up, there is nothing in the virtqueue. virtio_queue_host_notifier_aio_poll calls virtio_queue_empty even in this case; we have to filter it out just like virtio_queue_notify_aio_vq. Reported-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
parent
42697d88de
commit
dd3dd4ba7b
1 changed files with 1 additions and 1 deletions
|
@ -2291,7 +2291,7 @@ static bool virtio_queue_host_notifier_aio_poll(void *opaque)
|
||||||
VirtQueue *vq = container_of(n, VirtQueue, host_notifier);
|
VirtQueue *vq = container_of(n, VirtQueue, host_notifier);
|
||||||
bool progress;
|
bool progress;
|
||||||
|
|
||||||
if (virtio_queue_empty(vq)) {
|
if (!vq->vring.desc || virtio_queue_empty(vq)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue