1dd873966SEric Auger /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 274c98e20SCornelia Huck /* 374c98e20SCornelia Huck * Interfaces for vfio-ccw 474c98e20SCornelia Huck * 574c98e20SCornelia Huck * Copyright IBM Corp. 2017 674c98e20SCornelia Huck * 774c98e20SCornelia Huck * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> 874c98e20SCornelia Huck */ 974c98e20SCornelia Huck 1074c98e20SCornelia Huck #ifndef _VFIO_CCW_H_ 1174c98e20SCornelia Huck #define _VFIO_CCW_H_ 1274c98e20SCornelia Huck 1374c98e20SCornelia Huck #include <linux/types.h> 1474c98e20SCornelia Huck 15*d9cb4336SCornelia Huck /* used for START SUBCHANNEL, always present */ 1674c98e20SCornelia Huck struct ccw_io_region { 1774c98e20SCornelia Huck #define ORB_AREA_SIZE 12 1874c98e20SCornelia Huck __u8 orb_area[ORB_AREA_SIZE]; 1974c98e20SCornelia Huck #define SCSW_AREA_SIZE 12 2074c98e20SCornelia Huck __u8 scsw_area[SCSW_AREA_SIZE]; 2174c98e20SCornelia Huck #define IRB_AREA_SIZE 96 2274c98e20SCornelia Huck __u8 irb_area[IRB_AREA_SIZE]; 2374c98e20SCornelia Huck __u32 ret_code; 2474c98e20SCornelia Huck } __attribute__((packed)); 2574c98e20SCornelia Huck 26*d9cb4336SCornelia Huck /* 27*d9cb4336SCornelia Huck * used for processing commands that trigger asynchronous actions 28*d9cb4336SCornelia Huck * Note: this is controlled by a capability 29*d9cb4336SCornelia Huck */ 30*d9cb4336SCornelia Huck #define VFIO_CCW_ASYNC_CMD_HSCH (1 << 0) 31*d9cb4336SCornelia Huck #define VFIO_CCW_ASYNC_CMD_CSCH (1 << 1) 32*d9cb4336SCornelia Huck struct ccw_cmd_region { 33*d9cb4336SCornelia Huck __u32 command; 34*d9cb4336SCornelia Huck __u32 ret_code; 35*d9cb4336SCornelia Huck } __attribute__((packed)); 36*d9cb4336SCornelia Huck 3774c98e20SCornelia Huck #endif 38