diff options
author | Joao Martins <joao.m.martins@oracle.com> | 2024-07-22 22:13:24 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2024-07-23 17:14:52 +0200 |
commit | 7c30710bd99510b1ce91a1b287118c759c55a495 (patch) | |
tree | b0ce83a3f484c6b1e17bf5d50ac4f6c6bd327951 /include/sysemu | |
parent | 52ce88229c2d63a223f4c822240e84c3daeb7f6e (diff) |
vfio/iommufd: Implement VFIOIOMMUClass::query_dirty_bitmap support
ioctl(iommufd, IOMMU_HWPT_GET_DIRTY_BITMAP, arg) is the UAPI
that fetches the bitmap that tells what was dirty in an IOVA
range.
A single bitmap is allocated and used across all the hwpts
sharing an IOAS which is then used in log_sync() to set Qemu
global bitmaps.
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/iommufd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sysemu/iommufd.h b/include/sysemu/iommufd.h index 6fb412f611..4c4886c778 100644 --- a/include/sysemu/iommufd.h +++ b/include/sysemu/iommufd.h @@ -57,6 +57,10 @@ bool iommufd_backend_alloc_hwpt(IOMMUFDBackend *be, uint32_t dev_id, Error **errp); bool iommufd_backend_set_dirty_tracking(IOMMUFDBackend *be, uint32_t hwpt_id, bool start, Error **errp); +bool iommufd_backend_get_dirty_bitmap(IOMMUFDBackend *be, uint32_t hwpt_id, + uint64_t iova, ram_addr_t size, + uint64_t page_size, uint64_t *data, + Error **errp); #define TYPE_HOST_IOMMU_DEVICE_IOMMUFD TYPE_HOST_IOMMU_DEVICE "-iommufd" #endif |