diff options
author | Yishai Hadas <yishaih@nvidia.com> | 2023-12-19 12:32:45 +0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2023-12-19 21:51:33 +0300 |
commit | 8bccc5b80678c69f7729ce4cd232c0aa98fa6277 (patch) | |
tree | 14eab7eb106321afcb57e3bd19590932b36fb54f /include/linux/vfio_pci_core.h | |
parent | c3fc3e098bd64c560dde49a6e72b21b055150abe (diff) | |
download | linux-8bccc5b80678c69f7729ce4cd232c0aa98fa6277.tar.xz |
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>
Diffstat (limited to 'include/linux/vfio_pci_core.h')
-rw-r--r-- | include/linux/vfio_pci_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/vfio_pci_core.h b/include/linux/vfio_pci_core.h index 562e8754869d..67ac58e20e1d 100644 --- a/include/linux/vfio_pci_core.h +++ b/include/linux/vfio_pci_core.h @@ -127,6 +127,7 @@ int vfio_pci_core_match(struct vfio_device *core_vdev, char *buf); int vfio_pci_core_enable(struct vfio_pci_core_device *vdev); void vfio_pci_core_disable(struct vfio_pci_core_device *vdev); void vfio_pci_core_finish_enable(struct vfio_pci_core_device *vdev); +int vfio_pci_core_setup_barmap(struct vfio_pci_core_device *vdev, int bar); pci_ers_result_t vfio_pci_core_aer_err_detected(struct pci_dev *pdev, pci_channel_state_t state); |