mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
e559706338
commit
bb424490ed
5 changed files with 44 additions and 17 deletions
|
@ -31,11 +31,27 @@ int vfio_container_dma_unmap(VFIOContainerBase *bcontainer,
|
|||
return bcontainer->ops->dma_unmap(bcontainer, iova, size, iotlb);
|
||||
}
|
||||
|
||||
int vfio_container_set_dirty_page_tracking(VFIOContainerBase *bcontainer,
|
||||
bool start)
|
||||
{
|
||||
g_assert(bcontainer->ops->set_dirty_page_tracking);
|
||||
return bcontainer->ops->set_dirty_page_tracking(bcontainer, start);
|
||||
}
|
||||
|
||||
int vfio_container_query_dirty_bitmap(VFIOContainerBase *bcontainer,
|
||||
VFIOBitmap *vbmap,
|
||||
hwaddr iova, hwaddr size)
|
||||
{
|
||||
g_assert(bcontainer->ops->query_dirty_bitmap);
|
||||
return bcontainer->ops->query_dirty_bitmap(bcontainer, vbmap, iova, size);
|
||||
}
|
||||
|
||||
void vfio_container_init(VFIOContainerBase *bcontainer, VFIOAddressSpace *space,
|
||||
const VFIOIOMMUOps *ops)
|
||||
{
|
||||
bcontainer->ops = ops;
|
||||
bcontainer->space = space;
|
||||
bcontainer->dirty_pages_supported = false;
|
||||
QLIST_INIT(&bcontainer->giommu_list);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue