WSL2-Linux-Kernel/drivers/vdpa
Eli Cohen bc04d93ea3 vdpa/mlx5: Fix suspend/resume index restoration
When we suspend the VM, the VDPA interface will be reset. When the VM is
resumed again, clear_virtqueues() will clear the available and used
indices resulting in hardware virqtqueue objects becoming out of sync.
We can avoid this function alltogether since qemu will clear them if
required, e.g. when the VM went through a reboot.

Moreover, since the hw available and used indices should always be
identical on query and should be restored to the same value same value
for virtqueues that complete in order, we set the single value provided
by set_vq_state(). In get_vq_state() we return the value of hardware
used index.

Fixes: b35ccebe3e ("vdpa/mlx5: Restore the hardware used index after change map")
Fixes: 1a86b377aa ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20210408091047.4269-6-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
2021-04-09 12:08:28 -04:00
..
ifcvf vdpa: set the virtqueue num during register 2021-02-25 14:26:00 -05:00
mlx5 vdpa/mlx5: Fix suspend/resume index restoration 2021-04-09 12:08:28 -04:00
vdpa_sim vdpa_sim: Skip typecasting from void* 2021-03-14 04:37:36 -04:00
Kconfig vdpa: Define vdpa mgmt device, ops and a netlink interface 2021-02-23 07:52:56 -05:00
Makefile vdpa/mlx5: Add support library for mlx5 VDPA implementation 2020-08-05 19:00:23 -04:00
vdpa.c vdpa: set the virtqueue num during register 2021-02-25 14:26:00 -05:00