linux-stable/drivers/vdpa
Stefano Garzarella 794ec498c9 vdpa_sim: fix vringh initialization in vdpasim_queue_ready()
When we initialize vringh, we should pass the features and the
number of elements in the virtqueue negotiated with the driver,
otherwise operations with vringh may fail.

This was discovered in a case where the driver sets a number of
elements in the virtqueue different from the value returned by
.get_vq_num_max().

In vdpasim_vq_reset() is safe to initialize the vringh with
default values, since the virtqueue will not be used until
vdpasim_queue_ready() is called again.

Fixes: 2c53d0f64c ("vdpasim: vDPA device simulator")
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20221110141335.62171-1-sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
2022-12-28 05:28:10 -05:00
..
alibaba vdpa: multiple address spaces support 2022-05-31 12:44:27 -04:00
ifcvf vdpa/ifcvf: fix the calculation of queuepair 2022-09-27 18:30:48 -04:00
mlx5 RDMA/mlx5: remove variable i 2022-12-28 05:28:09 -05:00
vdpa_sim vdpa_sim: fix vringh initialization in vdpasim_queue_ready() 2022-12-28 05:28:10 -05:00
vdpa_user driver core: make struct class.devnode() take a const * 2022-11-24 17:12:27 +01:00
virtio_pci vp_vdpa: support feature provisioning 2022-10-07 09:32:41 -04:00
Kconfig eni_vdpa: add vDPA driver for Alibaba ENI 2021-11-01 05:23:41 -04:00
Makefile eni_vdpa: add vDPA driver for Alibaba ENI 2021-11-01 05:23:41 -04:00
vdpa.c vdpa: merge functionally duplicated dev_features attributes 2022-12-28 05:09:46 -05:00