summary refs log tree commit diff stats
path: root/include/hw/vfio/vfio-container-base.h
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2023-11-02 15:12:33 +0800
committerCédric Le Goater <clg@redhat.com>2023-12-19 19:03:38 +0100
commitbb424490edcef73d07f200d53f69415b203d81df (patch)
treea8d7e2aee552049d64acdef024e160a6ad3eb804 /include/hw/vfio/vfio-container-base.h
parente5597063386a0c76308ad16da31726d23f489945 (diff)
downloadfocaccia-qemu-bb424490edcef73d07f200d53f69415b203d81df.tar.gz
focaccia-qemu-bb424490edcef73d07f200d53f69415b203d81df.zip
vfio/container: Switch to IOMMU BE set_dirty_page_tracking/query_dirty_bitmap API
dirty_pages_supported field is also moved to the base container

No functional change intended.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/hw/vfio/vfio-container-base.h')
-rw-r--r--include/hw/vfio/vfio-container-base.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-container-base.h
index c7cc6ec9c5..f244f003d0 100644
--- a/include/hw/vfio/vfio-container-base.h
+++ b/include/hw/vfio/vfio-container-base.h
@@ -36,6 +36,7 @@ typedef struct VFIOAddressSpace {
 typedef struct VFIOContainerBase {
     const VFIOIOMMUOps *ops;
     VFIOAddressSpace *space;
+    bool dirty_pages_supported;
     QLIST_HEAD(, VFIOGuestIOMMU) giommu_list;
     QLIST_ENTRY(VFIOContainerBase) next;
 } VFIOContainerBase;
@@ -54,6 +55,11 @@ int vfio_container_dma_map(VFIOContainerBase *bcontainer,
 int vfio_container_dma_unmap(VFIOContainerBase *bcontainer,
                              hwaddr iova, ram_addr_t size,
                              IOMMUTLBEntry *iotlb);
+int vfio_container_set_dirty_page_tracking(VFIOContainerBase *bcontainer,
+                                           bool start);
+int vfio_container_query_dirty_bitmap(VFIOContainerBase *bcontainer,
+                                      VFIOBitmap *vbmap,
+                                      hwaddr iova, hwaddr size);
 
 void vfio_container_init(VFIOContainerBase *bcontainer,
                          VFIOAddressSpace *space,