linux/drivers/vdpa
Steve Sistare 480b3e7372 vdpa/mlx5: preserve CVQ vringh index
mlx5_vdpa does not preserve userland's view of vring base for the control
queue in the following sequence:

ioctl VHOST_SET_VRING_BASE
ioctl VHOST_VDPA_SET_STATUS VIRTIO_CONFIG_S_DRIVER_OK
  mlx5_vdpa_set_status()
    setup_cvq_vring()
      vringh_init_iotlb()
        vringh_init_kern()
          vrh->last_avail_idx = 0;
ioctl VHOST_GET_VRING_BASE

To fix, restore the value of cvq->vring.last_avail_idx after calling
vringh_init_iotlb.

Fixes: 5262912ef3 ("vdpa/mlx5: Add support for control VQ and MAC setting")

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <1699014387-194368-1-git-send-email-steven.sistare@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-12-01 09:52:03 -05:00
..
alibaba vdpa: multiple address spaces support 2022-05-31 12:44:27 -04:00
ifcvf vDPA/ifcvf: implement new accessors for vq_state 2023-07-03 12:15:12 -04:00
mlx5 vdpa/mlx5: preserve CVQ vringh index 2023-12-01 09:52:03 -05:00
pds pds_vdpa: fix up debugfs feature bit printing 2023-08-10 15:51:46 -04:00
solidrun vdpa/snet: implement the resume vDPA callback 2023-06-27 10:47:08 -04:00
vdpa_sim vdpa_sim_blk: allocate the buffer zeroed 2023-11-01 09:31:16 -04:00
vdpa_user vduse: make vduse_class constant 2023-11-01 09:19:59 -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