Lines Matching defs:region

72     struct ccw_io_region *region = vcdev->io_region;
81 QEMU_BUILD_BUG_ON(sizeof(region->orb_area) != sizeof(ORB));
82 QEMU_BUILD_BUG_ON(sizeof(region->scsw_area) != sizeof(SCSW));
83 QEMU_BUILD_BUG_ON(sizeof(region->irb_area) != sizeof(IRB));
85 memset(region, 0, sizeof(*region));
87 memcpy(region->orb_area, &sch->orb, sizeof(ORB));
88 memcpy(region->scsw_area, &sch->curr_status.scsw, sizeof(SCSW));
91 ret = pwrite(vcdev->vdev.fd, region,
97 error_report("vfio-ccw: write I/O region failed with errno=%d", errno);
122 struct ccw_schib_region *region = vcdev->schib_region;
126 /* schib region not available so nothing else to do */
127 if (!region) {
131 memset(region, 0, sizeof(*region));
132 ret = pread(vcdev->vdev.fd, region, vcdev->schib_region_size,
141 error_report("vfio-ccw: store region read failed with errno=%d", errno);
149 s = (SCHIB *)region->schib_area;
165 struct ccw_cmd_region *region = vcdev->async_cmd_region;
169 /* Async command region not available, fall back to emulation */
173 memset(region, 0, sizeof(*region));
174 region->command = VFIO_CCW_ASYNC_CMD_CSCH;
177 ret = pwrite(vcdev->vdev.fd, region,
183 error_report("vfio-ccw: write cmd region failed with errno=%d", errno);
204 struct ccw_cmd_region *region = vcdev->async_cmd_region;
208 /* Async command region not available, fall back to emulation */
212 memset(region, 0, sizeof(*region));
213 region->command = VFIO_CCW_ASYNC_CMD_HSCH;
216 ret = pwrite(vcdev->vdev.fd, region,
222 error_report("vfio-ccw: write cmd region failed with errno=%d", errno);
250 struct ccw_crw_region *region = vcdev->crw_region;
256 memset(region, 0, sizeof(*region));
257 size = pread(vcdev->vdev.fd, region, vcdev->crw_region_size,
261 error_report("vfio-ccw: Read crw region failed with errno=%d",
266 if (region->crw == 0) {
271 memcpy(&crw, &region->crw, sizeof(CRW));
304 struct ccw_io_region *region = vcdev->io_region;
317 size = pread(vcdev->vdev.fd, region, vcdev->io_region_size,
354 memcpy(&irb, region->irb_area, sizeof(IRB));
484 * We always expect at least the I/O region to be present. We also
501 error_setg(errp, "vfio: Unexpected size of the I/O region");
508 /* check for the optional async command region */
514 error_setg(errp, "vfio: Unexpected size of the async cmd region");
526 error_setg(errp, "vfio: Unexpected size of the schib region");
539 error_setg(errp, "vfio: Unexpected size of the CRW region");