Lines Matching refs:region
217 struct ccw_io_region *region; in vfio_ccw_mdev_read_io_region() local
220 if (pos + count > sizeof(*region)) in vfio_ccw_mdev_read_io_region()
224 region = private->io_region; in vfio_ccw_mdev_read_io_region()
225 if (copy_to_user(buf, (void *)region + pos, count)) in vfio_ccw_mdev_read_io_region()
251 return private->region[index].ops->read(private, buf, count, in vfio_ccw_mdev_read()
263 struct ccw_io_region *region; in vfio_ccw_mdev_write_io_region() local
266 if (pos + count > sizeof(*region)) in vfio_ccw_mdev_write_io_region()
272 region = private->io_region; in vfio_ccw_mdev_write_io_region()
273 if (copy_from_user((void *)region + pos, buf, count)) { in vfio_ccw_mdev_write_io_region()
279 ret = (region->ret_code != 0) ? region->ret_code : count; in vfio_ccw_mdev_write_io_region()
304 return private->region[index].ops->write(private, buf, count, in vfio_ccw_mdev_write()
358 info->size = private->region[i].size; in vfio_ccw_mdev_get_region_info()
359 info->flags = private->region[i].flags; in vfio_ccw_mdev_get_region_info()
361 cap_type.type = private->region[i].type; in vfio_ccw_mdev_get_region_info()
362 cap_type.subtype = private->region[i].subtype; in vfio_ccw_mdev_get_region_info()
484 struct vfio_ccw_region *region; in vfio_ccw_register_dev_region() local
486 region = krealloc(private->region, in vfio_ccw_register_dev_region()
487 (private->num_regions + 1) * sizeof(*region), in vfio_ccw_register_dev_region()
489 if (!region) in vfio_ccw_register_dev_region()
492 private->region = region; in vfio_ccw_register_dev_region()
493 private->region[private->num_regions].type = VFIO_REGION_TYPE_CCW; in vfio_ccw_register_dev_region()
494 private->region[private->num_regions].subtype = subtype; in vfio_ccw_register_dev_region()
495 private->region[private->num_regions].ops = ops; in vfio_ccw_register_dev_region()
496 private->region[private->num_regions].size = size; in vfio_ccw_register_dev_region()
497 private->region[private->num_regions].flags = flags; in vfio_ccw_register_dev_region()
498 private->region[private->num_regions].data = data; in vfio_ccw_register_dev_region()
510 private->region[i].ops->release(private, &private->region[i]); in vfio_ccw_unregister_dev_regions()
512 kfree(private->region); in vfio_ccw_unregister_dev_regions()
513 private->region = NULL; in vfio_ccw_unregister_dev_regions()