Skip to content

vhost: Get vring base from vq, not svq

Eugenio Pérez qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vhost: Get vring base from vq, not svqhw/virtio/vhost-vdpa.c+5 -30 replies
2/2vhost: Move SVQ queue rewind to the destinationhw/virtio/vhost-vdpa.c+11 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] vhost: Get vring base from vq, not svq

The SVQ vring used idx usually match with the guest visible one, as long as all the guest buffers (GPA) maps to exactly one buffer within qemu's VA. However, as we can see in virtqueue_map_desc, a single guest buffer could map to many buffers in SVQ vring.

The solution is to stop using the device's used idx and check for the last avail idx. Since we cannot report in-flight descriptors with vdpa, let's rewind all of them.

Also, move this rewind to the destination, so we keep migrating the in-flight ones in case the destnation backend support them (vhost-kernel, emulated virtio in qemu, etc.)

Eugenio Pérez (2):
vhost: Get vring base from vq, not svq
vhost: Move SVQ queue rewind to the destination

 hw/virtio/vhost-vdpa.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
2.31.1