Skip to content

Draft: Sync vDPA with upstream for RHEL9

Cindy Lu requested to merge lulu6/centos-stream-9:test into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2055451

build :https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=43228218

Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git

Test status: Tested by me

Signed-off-by: Cindy Lu lulu@redhat.com

Changes:

aec0eda8 (Cindy Lu) vdpa/mlx5: Fix tracking of current number of VQs

173b16c3 (Cindy Lu) vdpa/mlx5: Fix is_index_valid() to refer to features

15eb2f7e (Cindy Lu) vdpa: Protect vdpa reset with cf_mutex

3297762a (Cindy Lu) vdpa: Avoid taking cf_mutex lock on get status

ad7173cf (Cindy Lu) vdpa/vdpa_sim_net: Report max device capabilities

3c86a592 (Cindy Lu) vdpa: Use BIT_ULL for bit operations

3bc88de8 (Cindy Lu) vdpa/vdpa_sim: Configure max supported virtqueues

89120457 (Cindy Lu) vdpa/mlx5: Report max device capabilities

be5fdb92 (Cindy Lu) vdpa: Support reporting max device capabilities

031c59ce (Cindy Lu) vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps()

d678a254 (Cindy Lu) vdpa: Add support for returning device configuration information

d5d55333 (Cindy Lu) vdpa/mlx5: Support configuring max data virtqueue

466c4568 (Cindy Lu) vdpa/mlx5: Fix config_attr_mask assignment

c4f78278 (Cindy Lu) vdpa: Allow to configure max data virtqueues

2019e27c (Cindy Lu) vdpa: Read device configuration only if FEATURES_OK

0fbbead6 (Cindy Lu) vdpa: Sync calls set/get config/status with cf_mutex

d31536ef (Cindy Lu) vdpa/mlx5: Distribute RX virtqueues in RQT object

64cef87d (Cindy Lu) vdpa: Provide interface to read driver features

c09a460d (Cindy Lu) vdpa: clean up get_config_size ret value handling

09f511d2 (Cindy Lu) vdpa/mlx5: Fix wrong configuration of virtio_version_1_0

e09bd209 (Cindy Lu) vdpa: Mark vdpa_config_ops.get_vq_notification as optional

a15e6798 (Cindy Lu) vdpa: Avoid duplicate call to vp_vdpa get_status

0a03e886 (Cindy Lu) net/mlx5_vdpa: Offer VIRTIO_NET_F_MTU when setting MTU

1f58ff16 (Cindy Lu) vdpa: add driver_override support

ee7fca5b (Cindy Lu) docs: document sysfs ABI for vDPA bus

34dfe0cd (Cindy Lu) ifcvf/vDPA: fix misuse virtio-net device config size for blk dev

7e231221 (Cindy Lu) vdpa: Consider device id larger than 31

e3e073c8 (Cindy Lu) virtio: always enter drivers/virtio/

aade3f08 (Cindy Lu) vdpa: check that offsets are within bounds

e174b5ad (Cindy Lu) vdpa_sim: avoid putting an uninitialized iova_domain

37b41aaf (Cindy Lu) vhost-vdpa: clean irqs before reseting vdpa device

f2b1d34d (Cindy Lu) vdpa/mlx5: Forward only packets with allowed MAC address

dac9dd07 (Cindy Lu) vdpa/mlx5: Support configuration of MAC

5de2da46 (Cindy Lu) vdpa/mlx5: Fix clearing of VIRTIO_NET_F_MAC feature bit

eb200bbb (Cindy Lu) vdpa_sim_net: Enable user to set mac address and mtu

3487d34d (Cindy Lu) vdpa: Enable user to set mac and mtu of vdpa device

5e027c49 (Cindy Lu) vdpa: Use kernel coding style for structure comments

7f6482a3 (Cindy Lu) vdpa: Introduce query of device config layout

14129121 (Cindy Lu) vdpa: Introduce and use vdpa device get, set config helpers

6f3a7df2 (Cindy Lu) vdpa/mlx5: Propagate link status from device to vdpa driver

ba6fdbf6 (Cindy Lu) vdpa/mlx5: Rename control VQ workqueue to vdpa wq

4a6cd98d (Cindy Lu) vdpa/mlx5: Remove mtu field from vdpa net device

171f24ab (Cindy Lu) vdpa: add new attribute VDPA_ATTR_DEV_MIN_VQ_SIZE

8cf5559b (Cindy Lu) virtio_vdpa: setup correct vq size with callbacks get_vq_num_{max,min}

9adf7212 (Cindy Lu) vdpa: min vq num of vdpa device cannot be greater than max vq num

35b04d39 (Cindy Lu) vdpa: add new callback get_vq_num_min in vdpa_config_ops

42a21ec3 (Cindy Lu) vp_vdpa: add vq irq offloading support

b09fb7ef (Cindy Lu) vdpa: fix typo

227e41a0 (Cindy Lu) vhost-vdpa: Fix the wrong input in config_cb

32440426 (Cindy Lu) vhost_vdpa: unset vq irq before freeing irq

1679ff13 (Cindy Lu) vdpa: potential uninitialized return in vhost_vdpa_va_map()

0e70751d (Cindy Lu) vdpa/mlx5: Avoid executing set_vq_ready() if device is reset

af00ce2e (Cindy Lu) vdpa/mlx5: Clear ready indication for control VQ

670ffd4b (Cindy Lu) vdpa: Support transferring virtual addressing during DMA mapping

34c0b27c (Cindy Lu) vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()

f15f487c (Cindy Lu) vdpa: Add an opaque pointer for vdpa_config_ops.dma_map()

aa9df4bf (Cindy Lu) vhost-iotlb: Add an opaque pointer for vhost IOTLB

5e6c9c1f (Cindy Lu) vhost-vdpa: Handle the failure of vdpa_reset()

5d7e0371 (Cindy Lu) vdpa: Add reset callback in vdpa_config_ops

3dd915f4 (Cindy Lu) vdpa: Fix some coding style issues

9f27f4ff (Cindy Lu) vdpa: Make use of PFN_PHYS/PFN_UP/PFN_DOWN helper macro

f87d4b95 (Cindy Lu) vdpa/mlx5: Add multiqueue support

2a8787e8 (Cindy Lu) vdpa/mlx5: Add support for control VQ and MAC setting

b20a949f (Cindy Lu) vdpa/mlx5: Ensure valid indices are provided

b85eedca (Cindy Lu) vdpa/mlx5: Decouple virtqueue callback from struct mlx5_vdpa_virtqueue

55095f22 (Cindy Lu) vdpa/mlx5: function prototype modifications in preparation to control VQ

2098190b (Cindy Lu) vdpa/mlx5: Remove redundant header file inclusion

c93e00c1 (Cindy Lu) vDPA/ifcvf: enable multiqueue and control vq

eb0a20ab (Cindy Lu) vDPA/ifcvf: detect and use the onboard number of queues directly

d5d50802 (Cindy Lu) vDPA/ifcvf: implement management netlink framework for ifcvf

768fe6ca (Cindy Lu) vDPA/ifcvf: introduce get_dev_type() which returns virtio dev id

Documentation/ABI/testing/sysfs-bus-vdpa | 57 +++ MAINTAINERS | 1 + drivers/Makefile | 3 +- drivers/vdpa/Kconfig | 1 + drivers/vdpa/ifcvf/ifcvf_base.c | 49 +- drivers/vdpa/ifcvf/ifcvf_base.h | 34 +- drivers/vdpa/ifcvf/ifcvf_main.c | 290 +++++++---- drivers/vdpa/mlx5/core/mlx5_vdpa.h | 26 +- drivers/vdpa/mlx5/core/mr.c | 81 ++- drivers/vdpa/mlx5/core/resources.c | 35 ++ drivers/vdpa/mlx5/net/mlx5_vnet.c | 842 ++++++++++++++++++++++++++----- drivers/vdpa/vdpa.c | 400 ++++++++++++++- drivers/vdpa/vdpa_sim/vdpa_sim.c | 54 +- drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 3 +- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 40 +- drivers/vdpa/virtio_pci/vp_vdpa.c | 45 +- drivers/vhost/iotlb.c | 20 +- drivers/vhost/vdpa.c | 213 +++++--- drivers/virtio/virtio_vdpa.c | 26 +- include/linux/vdpa.h | 138 +++-- include/linux/vhost_iotlb.h | 3 + include/uapi/linux/vdpa.h | 13 + 22 files changed, 1935 insertions(+), 439 deletions(-)

Edited by Cindy Lu

Merge request reports