]> Git Repo - linux.git/commit
vdpa/mlx5: Add support for running with virtio_vdpa
authorEli Cohen <[email protected]>
Wed, 2 Jun 2021 08:58:54 +0000 (11:58 +0300)
committerMichael S. Tsirkin <[email protected]>
Sat, 3 Jul 2021 08:51:17 +0000 (04:51 -0400)
commit6f5312f801836e6af9bcbb0bdb44dc423e129206
treec59c1fa97ff134de829d1d68744075d5c83e084a
parent7d23dcdf213c2e5f097eb7eec3148c26eb01d59f
vdpa/mlx5: Add support for running with virtio_vdpa

In order to support running vdpa using vritio_vdpa driver, we need  to
create a different kind of MR, one that has 1:1 mapping, since the
addresses referring to virtqueues are dma addresses.

We create the 1:1 MR in mlx5_vdpa_dev_add() only in case firmware
supports the general capability umem_uid_0. The reason for that is that
1:1 MRs must be created with uid == 0 while virtqueue objects can be
created with uid == 0 only when the firmware capability is on.

If the set_map() callback is called with new translations provided
through iotlb, the driver will destroy the 1:1 MR and create a regular
one.

Signed-off-by: Eli Cohen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
Acked-by: Jason Wang <[email protected]>
drivers/vdpa/mlx5/core/mlx5_vdpa.h
drivers/vdpa/mlx5/core/mr.c
drivers/vdpa/mlx5/net/mlx5_vnet.c
This page took 0.051147 seconds and 4 git commands to generate.