linux-stable/drivers/vdpa
Stefano Garzarella 4080fc1067 vdpa_sim: use iova module to allocate IOVA addresses
The identical mapping used until now created issues when mapping
different virtual pages with the same physical address.
To solve this issue, we can use the iova module, to handle the IOVA
allocation.
For simplicity we use an IOVA allocator with byte granularity.

We add two new functions, vdpasim_map_range() and vdpasim_unmap_range(),
to handle the IOVA allocation and the registration into the IOMMU/IOTLB.
These functions are used by dma_map_ops callbacks.

Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/20210315163450.254396-2-sgarzare@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-05-03 04:55:52 -04:00
..
ifcvf vDPA/ifcvf: deduce VIRTIO device ID from pdev ids 2021-05-03 04:55:52 -04:00
mlx5 vdpa/mlx5: Enable user to add/delete vdpa device 2021-05-03 04:55:51 -04:00
vdpa_sim vdpa_sim: use iova module to allocate IOVA addresses 2021-05-03 04:55:52 -04:00
virtio_pci vp_vdpa: report doorbell address 2021-05-03 04:55:52 -04:00
Kconfig vdpa_sim: use iova module to allocate IOVA addresses 2021-05-03 04:55:52 -04:00
Makefile vdpa: introduce virtio pci driver 2021-05-03 04:55:51 -04:00
vdpa.c vdpa: Follow kdoc comment style 2021-05-03 04:55:51 -04:00