Lines Matching refs:bcontainer
30 static int iommufd_cdev_map(const VFIOContainerBase *bcontainer, hwaddr iova, in iommufd_cdev_map() argument
34 container_of(bcontainer, VFIOIOMMUFDContainer, bcontainer); in iommufd_cdev_map()
41 static int iommufd_cdev_unmap(const VFIOContainerBase *bcontainer, in iommufd_cdev_unmap() argument
46 container_of(bcontainer, VFIOIOMMUFDContainer, bcontainer); in iommufd_cdev_unmap()
119 static int iommufd_set_dirty_page_tracking(const VFIOContainerBase *bcontainer, in iommufd_set_dirty_page_tracking() argument
123 container_of(bcontainer, VFIOIOMMUFDContainer, bcontainer); in iommufd_set_dirty_page_tracking()
150 static int iommufd_query_dirty_bitmap(const VFIOContainerBase *bcontainer, in iommufd_query_dirty_bitmap() argument
154 VFIOIOMMUFDContainer *container = container_of(bcontainer, in iommufd_query_dirty_bitmap()
156 bcontainer); in iommufd_query_dirty_bitmap()
348 container->bcontainer.dirty_pages_supported |= in iommufd_cdev_autodomains_get()
350 if (container->bcontainer.dirty_pages_supported && in iommufd_cdev_autodomains_get()
402 VFIOContainerBase *bcontainer = &container->bcontainer; in iommufd_cdev_container_destroy() local
404 if (!QLIST_EMPTY(&bcontainer->device_list)) { in iommufd_cdev_container_destroy()
407 memory_listener_unregister(&bcontainer->listener); in iommufd_cdev_container_destroy()
423 VFIOContainerBase *bcontainer = &container->bcontainer; in iommufd_cdev_get_info_iova_range() local
450 bcontainer->iova_ranges = in iommufd_cdev_get_info_iova_range()
451 range_list_insert(bcontainer->iova_ranges, range); in iommufd_cdev_get_info_iova_range()
453 bcontainer->pgsizes = info->out_iova_alignment; in iommufd_cdev_get_info_iova_range()
465 VFIOContainerBase *bcontainer; in iommufd_cdev_attach() local
503 QLIST_FOREACH(bcontainer, &space->containers, next) { in iommufd_cdev_attach()
504 container = container_of(bcontainer, VFIOIOMMUFDContainer, bcontainer); in iommufd_cdev_attach()
505 if (VFIO_IOMMU_GET_CLASS(bcontainer) != iommufd_vioc || in iommufd_cdev_attach()
538 bcontainer = &container->bcontainer; in iommufd_cdev_attach()
539 vfio_address_space_insert(space, bcontainer); in iommufd_cdev_attach()
555 bcontainer->pgsizes = qemu_real_host_page_size(); in iommufd_cdev_attach()
558 bcontainer->listener = vfio_memory_listener; in iommufd_cdev_attach()
559 memory_listener_register(&bcontainer->listener, bcontainer->space->as); in iommufd_cdev_attach()
561 if (bcontainer->error) { in iommufd_cdev_attach()
562 error_propagate_prepend(errp, bcontainer->error, in iommufd_cdev_attach()
567 bcontainer->initialized = true; in iommufd_cdev_attach()
576 if (!vfio_cpr_register_container(bcontainer, errp)) { in iommufd_cdev_attach()
593 vbasedev->bcontainer = bcontainer; in iommufd_cdev_attach()
594 QLIST_INSERT_HEAD(&bcontainer->device_list, vbasedev, container_next); in iommufd_cdev_attach()
617 VFIOContainerBase *bcontainer = vbasedev->bcontainer; in iommufd_cdev_detach() local
618 VFIOAddressSpace *space = bcontainer->space; in iommufd_cdev_detach()
619 VFIOIOMMUFDContainer *container = container_of(bcontainer, in iommufd_cdev_detach()
621 bcontainer); in iommufd_cdev_detach()
624 vbasedev->bcontainer = NULL; in iommufd_cdev_detach()
630 vfio_cpr_unregister_container(bcontainer); in iommufd_cdev_detach()
646 if (VFIO_IOMMU_GET_CLASS(vbasedev_iter->bcontainer) != iommufd_vioc) { in iommufd_cdev_pci_find_by_devid()
836 return vfio_container_get_iova_ranges(vdev->bcontainer); in hiod_iommufd_vfio_get_iova_ranges()
845 return vfio_container_get_page_size_mask(vdev->bcontainer); in hiod_iommufd_vfio_get_page_size_mask()