[Devel] [PATCH hci-8.2 v4 4/4] drivers/vhost/blk: add the VHOST_BLK_RESUBMIT ioctl

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Dec 1 15:57:38 MSK 2026


> QEMU stops vhost-blk to pause the VM on a held request, and the list of
> held requests is emptied when the device starts again. The heads of
> these requests are already taken from the avail ring, so the kick
> handler never sees them, and the guest waits for them forever.
> 
> VHOST_BLK_RESUBMIT parses the descriptor chain of each given head and
> submits the request as if it were just taken from the avail ring. The
> request data stays in guest memory, so QEMU needs only the vq and head
> pairs it read with VHOST_BLK_GET_HELD_REQS, also after a migration. A
> request that fails with ENOSPC again is held again.
> 
> Only the owner may resubmit, as the descriptors are walked and the data
> pages are pinned through the mm of the caller.
> 
> A head out of range or still in flight fails with -EINVAL or -EBUSY
> before the descriptor chain is walked, as the walk and the request
> parser would report it as a guest error on the vring error eventfd:
> here the caller is at fault, and the errno already says so.
> 
> -EFAULT ends the call, so it is left for a fault on the array of the
> caller. A fault on the guest memory of one entry returns -EIO, and QEMU
> goes on with the entries after it.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-152175
> Feature: vhost-blk: in-kernel accelerator for virtio-blk guests
> Signed-off-by: Alexander Ivanov <alexander.ivanov at virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261201124931.1969095-1-alexander.ivanov@virtuozzo.com?part=4




More information about the Devel mailing list