Revision 97b83deb hw/virtio.c
b/hw/virtio.c | ||
---|---|---|
726 | 726 |
|
727 | 727 |
void virtio_notify(VirtIODevice *vdev, VirtQueue *vq) |
728 | 728 |
{ |
729 |
/* Always notify when queue is empty */ |
|
730 |
if ((vq->inuse || vring_avail_idx(vq) != vq->last_avail_idx) && |
|
731 |
(vring_avail_flags(vq) & VRING_AVAIL_F_NO_INTERRUPT)) |
|
729 |
/* Always notify when queue is empty (when feature acknowledge) */ |
|
730 |
if ((vring_avail_flags(vq) & VRING_AVAIL_F_NO_INTERRUPT) && |
|
731 |
(!(vdev->features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) || |
|
732 |
(vq->inuse || vring_avail_idx(vq) != vq->last_avail_idx))) |
|
732 | 733 |
return; |
733 | 734 |
|
734 | 735 |
vdev->isr |= 0x01; |
Also available in: Unified diff