1
2
3
4
5
6
7
8
9
10
11 #ifndef _VFIO_CCW_CP_H_
12 #define _VFIO_CCW_CP_H_
13
14 #include <asm/cio.h>
15 #include <asm/scsw.h>
16
17 #include "orb.h"
18
19
20
21
22
23 #define CCWCHAIN_LEN_MAX 256
24
25
26
27
28
29
30
31
32
33
34
35
36 struct channel_program {
37 struct list_head ccwchain_list;
38 union orb orb;
39 struct device *mdev;
40 bool initialized;
41 struct ccw1 *guest_cp;
42 };
43
44 extern int cp_init(struct channel_program *cp, struct device *mdev,
45 union orb *orb);
46 extern void cp_free(struct channel_program *cp);
47 extern int cp_prefetch(struct channel_program *cp);
48 extern union orb *cp_get_orb(struct channel_program *cp, u32 intparm, u8 lpm);
49 extern void cp_update_scsw(struct channel_program *cp, union scsw *scsw);
50 extern bool cp_iova_pinned(struct channel_program *cp, u64 iova);
51
52 #endif