From 233309e8e4c158af6c6b126d5ad021bae40a918a Mon Sep 17 00:00:00 2001 From: Zhenzhong Duan Date: Thu, 2 Nov 2023 15:12:43 +0800 Subject: vfio/spapr: switch to spapr IOMMU BE add/del_section_window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No functional change intended. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater --- hw/vfio/container-base.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'hw/vfio/container-base.c') diff --git a/hw/vfio/container-base.c b/hw/vfio/container-base.c index 0177f43741..71f7274973 100644 --- a/hw/vfio/container-base.c +++ b/hw/vfio/container-base.c @@ -31,6 +31,27 @@ int vfio_container_dma_unmap(VFIOContainerBase *bcontainer, return bcontainer->ops->dma_unmap(bcontainer, iova, size, iotlb); } +int vfio_container_add_section_window(VFIOContainerBase *bcontainer, + MemoryRegionSection *section, + Error **errp) +{ + if (!bcontainer->ops->add_window) { + return 0; + } + + return bcontainer->ops->add_window(bcontainer, section, errp); +} + +void vfio_container_del_section_window(VFIOContainerBase *bcontainer, + MemoryRegionSection *section) +{ + if (!bcontainer->ops->del_window) { + return; + } + + return bcontainer->ops->del_window(bcontainer, section); +} + int vfio_container_set_dirty_page_tracking(VFIOContainerBase *bcontainer, bool start) { -- cgit 1.4.1