]> git.baikalelectronics.ru Git - kernel.git/commit
vfio_pci: Allow mapping extra regions
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 19 Dec 2018 08:52:30 +0000 (19:52 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 21 Dec 2018 05:20:47 +0000 (16:20 +1100)
commit985e1ffbfcd6c8d34631a67b23b102e0952f7768
treea678db40915c9936689e1d523828a87622758d0d
parentfa4ad5a8627e8e4ed27cee53f349d3bf1c8cc35e
vfio_pci: Allow mapping extra regions

So far we only allowed mapping of MMIO BARs to the userspace. However
there are GPUs with on-board coherent RAM accessible via side
channels which we also want to map to the userspace. The first client
for this is NVIDIA V100 GPU with NVLink2 direct links to a POWER9
NPU-enabled CPU; such GPUs have 16GB RAM which is coherently mapped
to the system address space, we are going to export these as an extra
PCI region.

We already support extra PCI regions and this adds support for mapping
them to the userspace.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/vfio/pci/vfio_pci.c
drivers/vfio/pci/vfio_pci_private.h