]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa/mlx5: should keep avail_index despite device status
authorSi-Wei Liu <si-wei.liu@oracle.com>
Thu, 1 Oct 2020 20:18:31 +0000 (16:18 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 8 Oct 2020 20:02:00 +0000 (16:02 -0400)
commit09edbb826ecaac8f5af8c5e5fe802c53a47b10a1
tree64298129035632eac87a9601d6a57ce57915a084
parentc2b65e73f0698c71b70531b5675722698037d5b9
vdpa/mlx5: should keep avail_index despite device status

A VM with mlx5 vDPA has below warnings while being reset:

vhost VQ 0 ring restore failed: -1: Resource temporarily unavailable (11)
vhost VQ 1 ring restore failed: -1: Resource temporarily unavailable (11)

We should allow userspace emulating the virtio device be
able to get to vq's avail_index, regardless of vDPA device
status. Save the index that was last seen when virtq was
stopped, so that userspace doesn't complain.

Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Link: https://lore.kernel.org/r/1601583511-15138-1-git-send-email-si-wei.liu@oracle.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eli Cohen <elic@nvidia.com>
drivers/vdpa/mlx5/net/mlx5_vnet.c