mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -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
|
@ -83,7 +83,6 @@ typedef struct VFIOContainer {
|
|||
unsigned iommu_type;
|
||||
Error *error;
|
||||
bool initialized;
|
||||
bool dirty_pages_supported;
|
||||
uint64_t dirty_pgsizes;
|
||||
uint64_t max_dirty_bitmap_size;
|
||||
unsigned long pgsizes;
|
||||
|
@ -190,11 +189,6 @@ VFIOAddressSpace *vfio_get_address_space(AddressSpace *as);
|
|||
void vfio_put_address_space(VFIOAddressSpace *space);
|
||||
bool vfio_devices_all_running_and_saving(VFIOContainer *container);
|
||||
|
||||
/* container->fd */
|
||||
int vfio_set_dirty_page_tracking(VFIOContainer *container, bool start);
|
||||
int vfio_query_dirty_bitmap(VFIOContainer *container, VFIOBitmap *vbmap,
|
||||
hwaddr iova, hwaddr size);
|
||||
|
||||
/* SPAPR specific */
|
||||
int vfio_container_add_section_window(VFIOContainer *container,
|
||||
MemoryRegionSection *section,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue