virtio/vdpa: clear the virtqueue state during probe
authorEli Cohen <elic@nvidia.com>
Wed, 2 Jun 2021 02:15:36 +0000 (10:15 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 8 Jul 2021 11:49:02 +0000 (07:49 -0400)
commitefa08cb468cdd67855f63f341eac5f5f9ac93370
tree8f6b49119a58496c0a7221c90af202b4b169fc8c
parent1225c216d9542ed4883027d3af50035c35a7a03c
virtio/vdpa: clear the virtqueue state during probe

Clear the available index as part of the initialization process to
clear and values that might be left from previous usage of the device.
For example, if the device was previously used by vhost_vdpa and now
probed by vhost_vdpa, you want to start with indices.

Fixes: c043b4a8cf3b ("virtio: introduce a vDPA based transport")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210602021536.39525-5-jasowang@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eli Cohen <elic@nvidia.com>
drivers/virtio/virtio_vdpa.c