mirror of
https://github.com/mii443/qemu.git
synced 2025-12-09 05:58:32 +00:00
vfio/common: Introduce vfio_container_init/destroy helper
This adds two helper functions vfio_container_init/destroy which will be used by both legacy and iommufd containers to do base container specific initialization and release. No functional change intended. Suggested-by: Cédric Le Goater <clg@redhat.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:
committed by
Cédric Le Goater
parent
b08501a999
commit
ed2f7f8017
@@ -38,6 +38,10 @@ int vfio_container_dma_unmap(VFIOContainerBase *bcontainer,
|
||||
hwaddr iova, ram_addr_t size,
|
||||
IOMMUTLBEntry *iotlb);
|
||||
|
||||
void vfio_container_init(VFIOContainerBase *bcontainer,
|
||||
const VFIOIOMMUOps *ops);
|
||||
void vfio_container_destroy(VFIOContainerBase *bcontainer);
|
||||
|
||||
struct VFIOIOMMUOps {
|
||||
/* basic feature */
|
||||
int (*dma_map)(VFIOContainerBase *bcontainer,
|
||||
|
||||
Reference in New Issue
Block a user