vfio/pci: Expose vfio_pci_core_setup_barmap()
authorYishai Hadas <yishaih@nvidia.com>
Tue, 19 Dec 2023 09:32:45 +0000 (11:32 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 19 Dec 2023 18:51:33 +0000 (11:51 -0700)
commit8bccc5b80678c69f7729ce4cd232c0aa98fa6277
tree14eab7eb106321afcb57e3bd19590932b36fb54f
parentc3fc3e098bd64c560dde49a6e72b21b055150abe
vfio/pci: Expose vfio_pci_core_setup_barmap()

Expose vfio_pci_core_setup_barmap() to be used by drivers.

This will let drivers to mmap a BAR and re-use it from both vfio and the
driver when it's applicable.

This API will be used in the next patches by the vfio/virtio coming
driver.

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/r/20231219093247.170936-8-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci_rdwr.c
include/linux/vfio_pci_core.h