Lines Matching full:unmap
67 struct vfio_iommu_type1_dma_unmap *unmap; in vfio_dma_unmap_bitmap() local
77 unmap = g_malloc0(sizeof(*unmap) + sizeof(*bitmap)); in vfio_dma_unmap_bitmap()
79 unmap->argsz = sizeof(*unmap) + sizeof(*bitmap); in vfio_dma_unmap_bitmap()
80 unmap->iova = iova; in vfio_dma_unmap_bitmap()
81 unmap->size = size; in vfio_dma_unmap_bitmap()
82 unmap->flags |= VFIO_DMA_UNMAP_FLAG_GET_DIRTY_BITMAP; in vfio_dma_unmap_bitmap()
83 bitmap = (struct vfio_bitmap *)&unmap->data; in vfio_dma_unmap_bitmap()
95 error_report("UNMAP: Size of bitmap too big 0x%"PRIx64, vbmap.size); in vfio_dma_unmap_bitmap()
100 ret = ioctl(container->fd, VFIO_IOMMU_UNMAP_DMA, unmap); in vfio_dma_unmap_bitmap()
109 g_free(unmap); in vfio_dma_unmap_bitmap()
124 struct vfio_iommu_type1_dma_unmap unmap = { in vfio_legacy_dma_unmap() local
125 .argsz = sizeof(unmap), in vfio_legacy_dma_unmap()
143 while (ioctl(container->fd, VFIO_IOMMU_UNMAP_DMA, &unmap)) { in vfio_legacy_dma_unmap()
148 * condition and re-try the unmap excluding the last page. The in vfio_legacy_dma_unmap()
150 * unmap request comes via vIOMMU support which also makes it unlikely in vfio_legacy_dma_unmap()
156 if (errno == EINVAL && unmap.size && !(unmap.iova + unmap.size) && in vfio_legacy_dma_unmap()
159 unmap.size -= 1ULL << ctz64(bcontainer->pgsizes); in vfio_legacy_dma_unmap()
195 * Try the mapping, if it fails with EBUSY, unmap the region and try in vfio_legacy_dma_map()