vdpa/mlx5: Add shared memory registration code
authorEli Cohen <eli@mellanox.com>
Tue, 4 Aug 2020 16:20:47 +0000 (19:20 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 5 Aug 2020 23:00:24 +0000 (19:00 -0400)
commit94abbccdf2916cb03f9626f2d36c6e9971490c12
tree81f45c0b4cc6ef67f56d3fc13bc256558d1d1c08
parent29064bfdabd5ef49eac6909d3a36a075e3b52255
vdpa/mlx5: Add shared memory registration code

Add code to support registering address space region for the device. The
virtio driver can run as either:
1. Guest virtio driver
2. Userspace virtio driver on the host
3. Kernel virtio driver on the host

In any case a memory key object is required to provide access to memory
for the device.

This code will be shared by network or block driver implementations.

Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Eli Cohen <eli@mellanox.com>
Link: https://lore.kernel.org/r/20200804162048.22587-12-eli@mellanox.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/mlx5/Makefile
drivers/vdpa/mlx5/core/Makefile [deleted file]
drivers/vdpa/mlx5/core/mlx5_vdpa.h
drivers/vdpa/mlx5/core/mr.c [new file with mode: 0644]
drivers/vdpa/mlx5/core/resources.c