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.
Showing the changes to include/uapi/linux (2 of 8 files). Show all
Unified · Split
| @@ -354,6 +354,8 @@ struct vfio_region_gfx_edid { · 353 unmodified lines | |||
| 354 | }; | 354 | }; |
| 355 | 355 | ||
| 356 | #define VFIO_REGION_TYPE_CCW (2) | 356 | #define VFIO_REGION_TYPE_CCW (2) |
| 357 | /* ccw sub-types */ | ||
| 358 | #define VFIO_REGION_SUBTYPE_CCW_ASYNC_CMD (1) | ||
| 357 | 359 | ||
| 358 | /* | 360 | /* |
| 359 | * 10de vendor sub-type | 361 | * 10de vendor sub-type |
| @@ -12,6 +12,7 @@ · 11 unmodified lines | |||
| 12 | 12 | ||
| 13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 14 | 14 | ||
| 15 | /* used for START SUBCHANNEL, always present */ | ||
| 15 | struct ccw_io_region { | 16 | struct ccw_io_region { |
| 16 | #define ORB_AREA_SIZE 12 | 17 | #define ORB_AREA_SIZE 12 |
| 17 | __u8 orb_area[ORB_AREA_SIZE]; | 18 | __u8 orb_area[ORB_AREA_SIZE]; |
| @@ -22,4 +23,15 @@ struct ccw_io_region { · 4 unmodified lines | |||
| 22 | __u32 ret_code; | 23 | __u32 ret_code; |
| 23 | } __packed; | 24 | } __packed; |
| 24 | 25 | ||
| 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 | |||
| 25 | #endif | 37 | #endif |