Skip to content

Fix expected set_vq_state behavior on vdpa_sim

Eugenio Pérez lkml virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vdpa_sim: not reset state in vdpasim_queue_readydrivers/vdpa/vdpa_sim/vdpa_sim.c+2 -04 replies
2/2vringh: fetch used_idx from vring at vringh_init_iotlbdrivers/vhost/vringh.c+23 -29 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJason WangLei Yang
1/2A-b T-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Fix expected set_vq_state behavior on vdpa_sim

The use of set_vq_state is to indicate vdpa device the state of a virtqueue. In the case of split, it means the avail_idx. This is mandatory for use cases like live migration.

However, vdpa_sim reset the vq state at vdpasim_queue_ready since it calls vringh_init_iotlb.

Also, to starting from an used_idx different than 0 is needed in use cases like virtual machine migration. Not doing so and letting the caller set an avail idx different than 0 causes destination device to try to use old buffers that source driver already recover and are not available anymore.

This series fixes both problems allowing to migrate to a vdpa_sim_net device.

Eugenio Pérez (2):
vdpa_sim: not reset state in vdpasim_queue_ready
vringh: fetch used_idx from vring at vringh_init_iotlb

 drivers/vdpa/vdpa_sim/vdpa_sim.c |  2 ++
 drivers/vhost/vringh.c           | 25 +++++++++++++++++++++++--
 2 files changed, 25 insertions(+), 2 deletions(-)
Signature · 1 line
2.31.1