Lines Matching refs:container
78 a container class, which may hold one or more groups. A container
81 On its own, the container provides little functionality, with all
83 The user needs to add a group into the container for the next level
97 Once the group is ready, it may be added to the container by opening
100 previously opened container file. If desired and if the IOMMU driver
102 be set to the same container. If a group fails to set to a container
103 with existing groups, a new empty container will need to be used
106 With a group (or groups) attached to a container, the remaining
167 int container, group, device, i;
174 /* Create a new container */
175 container = open("/dev/vfio/vfio", O_RDWR);
177 if (ioctl(container, VFIO_GET_API_VERSION) != VFIO_API_VERSION)
180 if (!ioctl(container, VFIO_CHECK_EXTENSION, VFIO_TYPE1_IOMMU))
192 /* Add the group to the container */
193 ioctl(group, VFIO_GROUP_SET_CONTAINER, &container);
196 ioctl(container, VFIO_SET_IOMMU, VFIO_TYPE1_IOMMU);
199 ioctl(container, VFIO_IOMMU_GET_INFO, &iommu_info);
208 ioctl(container, VFIO_IOMMU_MAP_DMA, &dma_map);
292 1) Only one IOMMU group per container is supported as an IOMMU group
321 VFIO_IOMMU_ENABLE - enables the container. The locked pages accounting
325 VFIO_IOMMU_DISABLE - disables the container.
334 /* Add the group to the container */
335 ioctl(group, VFIO_GROUP_SET_CONTAINER, &container);
338 ioctl(container, VFIO_SET_IOMMU, VFIO_SPAPR_TCE_IOMMU)
342 ioctl(container, VFIO_IOMMU_SPAPR_TCE_GET_INFO, &spapr_iommu_info);
344 if (ioctl(container, VFIO_IOMMU_ENABLE))
345 /* Cannot enable container, may be low rlimit */
356 ioctl(container, VFIO_IOMMU_MAP_DMA, &dma_map);
367 ioctl(container, VFIO_CHECK_EXTENSION, VFIO_EEH);
371 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
380 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
392 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
404 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
412 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
414 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
418 ioctl(container, VFIO_EEH_PE_OP, &pe_op);