diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/dataplane/virtio-blk.c | 3 | ||||
-rw-r--r-- | hw/virtio/dataplane/vring.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 0d9978109c..03b81bc48d 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/dataplane/virtio-blk.c @@ -128,7 +128,8 @@ static void handle_notify(EventNotifier *e) /* Re-enable guest->host notifies and stop processing the vring. * But if the guest has snuck in more descriptors, keep processing. */ - if (vring_enable_notification(s->vdev, &s->vring)) { + vring_enable_notification(s->vdev, &s->vring); + if (!vring_more_avail(s->vdev, &s->vring)) { break; } } else { /* fatal error */ diff --git a/hw/virtio/dataplane/vring.c b/hw/virtio/dataplane/vring.c index 4308d9f055..157e8b859c 100644 --- a/hw/virtio/dataplane/vring.c +++ b/hw/virtio/dataplane/vring.c @@ -175,7 +175,7 @@ void vring_disable_notification(VirtIODevice *vdev, Vring *vring) * * Return true if the vring is empty, false if there are more requests. */ -bool vring_enable_notification(VirtIODevice *vdev, Vring *vring) +void vring_enable_notification(VirtIODevice *vdev, Vring *vring) { if (virtio_vdev_has_feature(vdev, VIRTIO_RING_F_EVENT_IDX)) { vring_avail_event(&vring->vr) = vring->vr.avail->idx; @@ -183,7 +183,6 @@ bool vring_enable_notification(VirtIODevice *vdev, Vring *vring) vring_clear_used_flags(vdev, vring, VRING_USED_F_NO_NOTIFY); } smp_mb(); /* ensure update is seen before reading avail_idx */ - return !vring_more_avail(vdev, vring); } /* This is stolen from linux/drivers/vhost/vhost.c:vhost_notify() */ |