aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi/linux/vfio_ccw.h
diff options
context:
space:
mode:
authorDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>2017-03-17 04:17:34 +0100
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-03-31 12:55:06 +0200
commit060d2b5afcc4f9e2d61e2b059e648f569b8dba9a (patch)
treec33cfb0c149782f539391e3cbcc4cd021eb6886b /include/uapi/linux/vfio_ccw.h
parentvfio: ccw: register vfio_ccw to the mediated device framework (diff)
downloadwireguard-linux-060d2b5afcc4f9e2d61e2b059e648f569b8dba9a.tar.xz
wireguard-linux-060d2b5afcc4f9e2d61e2b059e648f569b8dba9a.zip
vfio: ccw: introduce ccw_io_region
To provide user-space a set of interfaces to: 1. pass in a ccw program to perform an I/O operation. 2. read back I/O results of the completed I/O operations. We introduce an MMIO region for the vfio-ccw device here. This region is defined to content: 1. areas to store arguments that an ssch required. 2. areas to store the I/O results. Using pwrite/pread to the device on this region, a user-space program could write/read data to/from the vfio-ccw device. Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Message-Id: <20170317031743.40128-8-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'include/uapi/linux/vfio_ccw.h')
-rw-r--r--include/uapi/linux/vfio_ccw.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/uapi/linux/vfio_ccw.h b/include/uapi/linux/vfio_ccw.h
new file mode 100644
index 000000000000..34a7f6f9e065
--- /dev/null
+++ b/include/uapi/linux/vfio_ccw.h
@@ -0,0 +1,24 @@
+/*
+ * Interfaces for vfio-ccw
+ *
+ * Copyright IBM Corp. 2017
+ *
+ * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
+ */
+
+#ifndef _VFIO_CCW_H_
+#define _VFIO_CCW_H_
+
+#include <linux/types.h>
+
+struct ccw_io_region {
+#define ORB_AREA_SIZE 12
+ __u8 orb_area[ORB_AREA_SIZE];
+#define SCSW_AREA_SIZE 12
+ __u8 scsw_area[SCSW_AREA_SIZE];
+#define IRB_AREA_SIZE 96
+ __u8 irb_area[IRB_AREA_SIZE];
+ __u32 ret_code;
+} __packed;
+
+#endif