mirror of https://github.com/xemu-project/xemu.git
vfio/container: Intoduce a new VFIOIOMMUClass::setup handler
This will help in converting the sPAPR IOMMU backend to a QOM interface. Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Tested-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
9812feefab
commit
61d893f2cd
|
@ -1129,6 +1129,7 @@ static void vfio_iommu_legacy_class_init(ObjectClass *klass, void *data)
|
|||
{
|
||||
VFIOIOMMUClass *vioc = VFIO_IOMMU_CLASS(klass);
|
||||
|
||||
vioc->setup = vfio_legacy_setup;
|
||||
vioc->dma_map = vfio_legacy_dma_map;
|
||||
vioc->dma_unmap = vfio_legacy_dma_unmap;
|
||||
vioc->attach_device = vfio_legacy_attach_device;
|
||||
|
|
|
@ -109,6 +109,7 @@ struct VFIOIOMMUClass {
|
|||
InterfaceClass parent_class;
|
||||
|
||||
/* basic feature */
|
||||
int (*setup)(VFIOContainerBase *bcontainer, Error **errp);
|
||||
int (*dma_map)(const VFIOContainerBase *bcontainer,
|
||||
hwaddr iova, ram_addr_t size,
|
||||
void *vaddr, bool readonly);
|
||||
|
|
Loading…
Reference in New Issue