Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * Interfaces for vfio-ccw
0004  *
0005  * Copyright IBM Corp. 2017
0006  *
0007  * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
0008  */
0009 
0010 #ifndef _VFIO_CCW_H_
0011 #define _VFIO_CCW_H_
0012 
0013 #include <linux/types.h>
0014 
0015 /* used for START SUBCHANNEL, always present */
0016 struct ccw_io_region {
0017 #define ORB_AREA_SIZE 12
0018     __u8    orb_area[ORB_AREA_SIZE];
0019 #define SCSW_AREA_SIZE 12
0020     __u8    scsw_area[SCSW_AREA_SIZE];
0021 #define IRB_AREA_SIZE 96
0022     __u8    irb_area[IRB_AREA_SIZE];
0023     __u32   ret_code;
0024 } __packed;
0025 
0026 /*
0027  * used for processing commands that trigger asynchronous actions
0028  * Note: this is controlled by a capability
0029  */
0030 #define VFIO_CCW_ASYNC_CMD_HSCH (1 << 0)
0031 #define VFIO_CCW_ASYNC_CMD_CSCH (1 << 1)
0032 struct ccw_cmd_region {
0033     __u32 command;
0034     __u32 ret_code;
0035 } __packed;
0036 
0037 /*
0038  * Used for processing commands that read the subchannel-information block
0039  * Reading this region triggers a stsch() to hardware
0040  * Note: this is controlled by a capability
0041  */
0042 struct ccw_schib_region {
0043 #define SCHIB_AREA_SIZE 52
0044     __u8 schib_area[SCHIB_AREA_SIZE];
0045 } __packed;
0046 
0047 /*
0048  * Used for returning a Channel Report Word to userspace.
0049  * Note: this is controlled by a capability
0050  */
0051 struct ccw_crw_region {
0052     __u32 crw;
0053     __u32 pad;
0054 } __packed;
0055 
0056 #endif