linux-stable/drivers/vdpa
Jonah Palmer bf6f4d5d8c vdpa/mlx5: Allow CVQ size changes
[ Upstream commit 749a401683 ]

The MLX driver was not updating its control virtqueue size at set_vq_num
and instead always initialized to MLX5_CVQ_MAX_ENT (16) at
setup_cvq_vring.

Qemu would try to set the size to 64 by default, however, because the
CVQ size always was initialized to 16, an error would be thrown when
sending >16 control messages (as used-ring entry 17 is initialized to 0).
For example, starting a guest with x-svq=on and then executing the
following command would produce the error below:

 # for i in {1..20}; do ifconfig eth0 hw ether XX:xx:XX:xx:XX:XX; done

 qemu-system-x86_64: Insufficient written data (0)
 [  435.331223] virtio_net virtio0: Failed to set mac address by vq command.
 SIOCSIFHWADDR: Invalid argument

Acked-by: Dragos Tatulea <dtatulea@nvidia.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20240216142502.78095-1-jonah.palmer@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Fixes: 5262912ef3 ("vdpa/mlx5: Add support for control VQ and MAC setting")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:20:10 -04:00
..
alibaba vdpa: Fix an error handling path in eni_vdpa_probe() 2024-01-25 15:35:54 -08:00
ifcvf vDPA/ifcvf: implement new accessors for vq_state 2023-07-03 12:15:12 -04:00
mlx5 vdpa/mlx5: Allow CVQ size changes 2024-03-26 18:20:10 -04:00
pds pds_vdpa: set features order 2024-01-20 11:51:41 +01:00
solidrun vdpa/snet: implement the resume vDPA callback 2023-06-27 10:47:08 -04:00
vdpa_sim vdpa_sim: reset must not run 2024-03-26 18:20:10 -04:00
vdpa_user vduse: Use proper spinlock for IRQ injection 2023-08-10 15:24:28 -04:00
virtio_pci vp_vdpa: fix the crash in hot unplug with vp_vdpa 2023-03-10 03:48:27 -05:00
Kconfig pds_vdpa: pds_vdps.rst and Kconfig 2023-06-27 10:47:09 -04:00
Makefile pds_vdpa: Add new vDPA driver for AMD/Pensando DSC 2023-06-27 10:47:08 -04:00
vdpa.c vdpa: Enable strict validation for netlinks ops 2023-08-10 15:24:28 -04:00