On 5/12/25 17:32, Steve Sistare wrote:
Export vfio_legacy_dma_map so it may be referenced outside the file
in a subsequent patch.
Signed-off-by: Steve Sistare <steven.sist...@oracle.com>
---
hw/vfio/container.c | 4 ++--
include/hw/vfio/vfio-container-base.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/container.c b/hw/vfio/container.c
index 278a220..a554683 100644
--- a/hw/vfio/container.c
+++ b/hw/vfio/container.c
@@ -208,8 +208,8 @@ static int vfio_legacy_dma_unmap(const VFIOContainerBase
*bcontainer,
return ret;
}
-static int vfio_legacy_dma_map(const VFIOContainerBase *bcontainer, hwaddr iova,
- ram_addr_t size, void *vaddr, bool readonly)
+int vfio_legacy_dma_map(const VFIOContainerBase *bcontainer, hwaddr iova,
+ ram_addr_t size, void *vaddr, bool readonly)
{
const VFIOContainer *container = container_of(bcontainer, VFIOContainer,
bcontainer);
diff --git a/include/hw/vfio/vfio-container-base.h
b/include/hw/vfio/vfio-container-base.h
index 1dc760f..a2f6c3a 100644
--- a/include/hw/vfio/vfio-container-base.h
+++ b/include/hw/vfio/vfio-container-base.h
@@ -186,4 +186,7 @@ struct VFIOIOMMUClass {
VFIORamDiscardListener *vfio_find_ram_discard_listener(
VFIOContainerBase *bcontainer, MemoryRegionSection *section);
+int vfio_legacy_dma_map(const VFIOContainerBase *bcontainer, hwaddr iova,
+ ram_addr_t size, void *vaddr, bool readonly);
+
#endif /* HW_VFIO_VFIO_CONTAINER_BASE_H */
I don't think this export is necessary. See comment on patch 10.
Thanks,
C.