brintos

brintos / linux-shallow public Read only

0
0
Text · 1.2 KiB · aa04f3a Raw
57 lines · c
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */2/*3 * Interfaces for vfio-ccw4 *5 * Copyright IBM Corp. 20176 *7 * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>8 */9 10#ifndef _VFIO_CCW_H_11#define _VFIO_CCW_H_12 13#include <linux/types.h>14 15/* used for START SUBCHANNEL, always present */16struct ccw_io_region {17#define ORB_AREA_SIZE 1218	__u8	orb_area[ORB_AREA_SIZE];19#define SCSW_AREA_SIZE 1220	__u8	scsw_area[SCSW_AREA_SIZE];21#define IRB_AREA_SIZE 9622	__u8	irb_area[IRB_AREA_SIZE];23	__u32	ret_code;24} __packed;25 26/*27 * used for processing commands that trigger asynchronous actions28 * Note: this is controlled by a capability29 */30#define VFIO_CCW_ASYNC_CMD_HSCH (1 << 0)31#define VFIO_CCW_ASYNC_CMD_CSCH (1 << 1)32struct ccw_cmd_region {33	__u32 command;34	__u32 ret_code;35} __packed;36 37/*38 * Used for processing commands that read the subchannel-information block39 * Reading this region triggers a stsch() to hardware40 * Note: this is controlled by a capability41 */42struct ccw_schib_region {43#define SCHIB_AREA_SIZE 5244	__u8 schib_area[SCHIB_AREA_SIZE];45} __packed;46 47/*48 * Used for returning a Channel Report Word to userspace.49 * Note: this is controlled by a capability50 */51struct ccw_crw_region {52	__u32 crw;53	__u32 pad;54} __packed;55 56#endif57