linux-yocto/drivers/vdpa
Konstantin Shkolnyy 0d508cefcd vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines
[ Upstream commit 439252e167 ]

mlx5_vdpa_dev_add() doesn’t initialize mvdev->actual_features. It’s
initialized later by mlx5_vdpa_set_driver_features(). However,
mlx5_vdpa_get_config() depends on the VIRTIO_F_VERSION_1 flag in
actual_features, to return data with correct endianness. When it’s called
before mlx5_vdpa_set_driver_features(), the data are incorrectly returned
as big-endian on big-endian machines, while QEMU then interprets them as
little-endian.

The fix is to initialize this VIRTIO_F_VERSION_1 as early as possible,
especially considering that mlx5_vdpa_dev_add() insists on this flag to
always be set anyway.

Signed-off-by: Konstantin Shkolnyy <kshk@linux.ibm.com>
Message-Id: <20250204173127.166673-1-kshk@linux.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-29 11:02:38 +02:00
..
alibaba eni_vdpa: implement vdpa_config_ops.get_vq_size 2024-03-19 02:45:50 -04:00
ifcvf vDPA/ifcvf: Fix pci_read_config_byte() return code handling 2024-11-06 04:40:07 -05:00
mlx5 vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines 2025-05-29 11:02:38 +02:00
octeon_ep vdpa/octeon_ep: Fix format specifier for pointers in debug messages 2024-09-25 07:07:44 -04:00
pds vdpa: Remove unused declarations 2024-09-25 07:07:43 -04:00
solidrun vdpa: solidrun: Fix UB bug with devres 2024-11-06 04:40:07 -05:00
vdpa_sim vdpa_sim_net: Add the support of set mac address 2024-09-10 02:51:48 -04:00
vdpa_user vduse: avoid using __GFP_NOFAIL 2024-09-09 16:39:02 -07:00
virtio_pci vp_vdpa: fix id_table array not null terminated error 2024-11-06 04:40:07 -05:00
Kconfig dma-mapping: clearly mark DMA ops as an architecture feature 2024-09-04 07:08:51 +03:00
Makefile virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices 2024-07-09 08:42:39 -04:00
vdpa.c vdpa: support set mac address from vdpa tool 2024-09-10 02:51:48 -04:00