Lines Matching refs:regions
19 vdev->regions = kcalloc(count, sizeof(struct vfio_cdx_region),
21 if (!vdev->regions)
27 vdev->regions[i].addr = res->start;
28 vdev->regions[i].size = resource_size(res);
29 vdev->regions[i].type = res->flags;
31 * Only regions addressed with PAGE granularity may be
34 if (!(vdev->regions[i].addr & ~PAGE_MASK) &&
35 !(vdev->regions[i].size & ~PAGE_MASK))
36 vdev->regions[i].flags |=
38 vdev->regions[i].flags |= VFIO_REGION_INFO_FLAG_READ;
40 vdev->regions[i].flags |= VFIO_REGION_INFO_FLAG_WRITE;
51 kfree(vdev->regions);
95 info.size = vdev->regions[info.index].size;
96 info.flags = vdev->regions[info.index].flags;
153 if (!(vdev->regions[index].flags & VFIO_REGION_INFO_FLAG_MMAP))
156 if (!(vdev->regions[index].flags & VFIO_REGION_INFO_FLAG_READ) &&
160 if (!(vdev->regions[index].flags & VFIO_REGION_INFO_FLAG_WRITE) &&
164 return vfio_cdx_mmap_mmio(vdev->regions[index], vma);