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
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-type361 * 10de vendor sub-type
include/uapi/linux/vfio_ccw.h+12−0
@@ -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 */
15struct ccw_io_region {16struct ccw_io_region {
16#define ORB_AREA_SIZE 1217#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)
32struct ccw_cmd_region {
33 __u32 command;
34 __u32 ret_code;
35} __packed;
36
25#endif37#endif