summary refs log tree commit diff stats
path: root/include/system/iommufd.h
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2025-07-02 14:58:42 -0700
committerCédric Le Goater <clg@redhat.com>2025-07-03 13:42:28 +0200
commite563dc88c21915e111ecef0756cc291e9e473c35 (patch)
treee10da58c31bddcb8a308dd248e6abd8f5a5a0320 /include/system/iommufd.h
parentccfc6715cf54caafba4c2516af394b4ed979c615 (diff)
downloadfocaccia-qemu-e563dc88c21915e111ecef0756cc291e9e473c35.tar.gz
focaccia-qemu-e563dc88c21915e111ecef0756cc291e9e473c35.zip
backends/iommufd: iommufd_backend_map_file_dma
Define iommufd_backend_map_file_dma to implement IOMMU_IOAS_MAP_FILE.
This will be called as a substitute for iommufd_backend_map_dma, so
the error conditions for BARs are copied as-is from that function.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Link: https://lore.kernel.org/qemu-devel/1751493538-202042-6-git-send-email-steven.sistare@oracle.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/system/iommufd.h')
-rw-r--r--include/system/iommufd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/system/iommufd.h b/include/system/iommufd.h
index 283861b924..2d24d93d17 100644
--- a/include/system/iommufd.h
+++ b/include/system/iommufd.h
@@ -43,6 +43,9 @@ void iommufd_backend_disconnect(IOMMUFDBackend *be);
 bool iommufd_backend_alloc_ioas(IOMMUFDBackend *be, uint32_t *ioas_id,
                                 Error **errp);
 void iommufd_backend_free_id(IOMMUFDBackend *be, uint32_t id);
+int iommufd_backend_map_file_dma(IOMMUFDBackend *be, uint32_t ioas_id,
+                                 hwaddr iova, ram_addr_t size, int fd,
+                                 unsigned long start, bool readonly);
 int iommufd_backend_map_dma(IOMMUFDBackend *be, uint32_t ioas_id, hwaddr iova,
                             ram_addr_t size, void *vaddr, bool readonly);
 int iommufd_backend_unmap_dma(IOMMUFDBackend *be, uint32_t ioas_id,