mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-03 20:59:53 +00:00
dm: virtio: ensure interrupt delivery in virtio-blk
virtio-blk never sets used_all_avail when calling vq_endchains(), which may become problematic if VIRTIO_F_NOTIFY_ON_EMPTY is enabled. Provide vq_endchains() with that info to ensure the delivery of an interrupt when the avail ring is drained in the case of VIRTIO_F_NOTIFY_ON_EMPTY. Tracked-On: #2763 Signed-off-by: Peter Fang <peter.fang@intel.com> Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
This commit is contained in:
parent
d38afa6f48
commit
fa375a2aa1
@ -201,7 +201,7 @@ virtio_blk_done(struct blockif_req *br, int err)
|
||||
*/
|
||||
pthread_mutex_lock(&blk->mtx);
|
||||
vq_relchain(&blk->vq, io->idx, 1);
|
||||
vq_endchains(&blk->vq, 0);
|
||||
vq_endchains(&blk->vq, !vq_has_descs(&blk->vq));
|
||||
pthread_mutex_unlock(&blk->mtx);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user