History

vfio-ccw: add handling for async channel instructions

Add a region to the vfio-ccw device that can be used to submit asynchronous I/O instructions. ssch continues to be handled by the existing I/O region; the new region handles hsch and csch. Interrupt status continues to be reported through the same channels as for ssch.

Cornelia Huck committed 8 years ago

Commit d5afd5d1 parent b0940858 files · +270 −18Browse files

Showing the changes to include/uapi/linux (2 of 8 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/vfio.h +2 −0
  2. include/uapi/linux/vfio_ccw.h +12 −0
include/uapi/linux/vfio.h+2−0
@@ -354,6 +354,8 @@ struct vfio_region_gfx_edid { · 353 unmodified lines
354354 };
355355
356356 #define VFIO_REGION_TYPE_CCW (2)
357+/* ccw sub-types */
358+#define VFIO_REGION_SUBTYPE_CCW_ASYNC_CMD (1)
357359
358360 /*
359361 * 10de vendor sub-type
include/uapi/linux/vfio_ccw.h+12−0
@@ -12,6 +12,7 @@ · 11 unmodified lines
1212
1313 #include <linux/types.h>
1414
15+/* used for START SUBCHANNEL, always present */
1516 struct ccw_io_region {
1617 #define ORB_AREA_SIZE 12
1718 __u8 orb_area[ORB_AREA_SIZE];
@@ -22,4 +23,15 @@ struct ccw_io_region { · 4 unmodified lines
2223 __u32 ret_code;
2324 } __packed;
2425
26+/*
27+ * used for processing commands that trigger asynchronous actions
28+ * Note: this is controlled by a capability
29+ */
30+#define VFIO_CCW_ASYNC_CMD_HSCH (1 << 0)
31+#define VFIO_CCW_ASYNC_CMD_CSCH (1 << 1)
32+struct ccw_cmd_region {
33+ __u32 command;
34+ __u32 ret_code;
35+} __packed;
36+
2537 #endif