.. | .. |
---|
15 | 15 | #include <asm/scsw.h> |
---|
16 | 16 | |
---|
17 | 17 | #include "orb.h" |
---|
| 18 | +#include "vfio_ccw_trace.h" |
---|
| 19 | + |
---|
| 20 | +/* |
---|
| 21 | + * Max length for ccw chain. |
---|
| 22 | + * XXX: Limit to 256, need to check more? |
---|
| 23 | + */ |
---|
| 24 | +#define CCWCHAIN_LEN_MAX 256 |
---|
18 | 25 | |
---|
19 | 26 | /** |
---|
20 | 27 | * struct channel_program - manage information for channel program |
---|
21 | 28 | * @ccwchain_list: list head of ccwchains |
---|
22 | 29 | * @orb: orb for the currently processed ssch request |
---|
23 | 30 | * @mdev: the mediated device to perform page pinning/unpinning |
---|
| 31 | + * @initialized: whether this instance is actually initialized |
---|
24 | 32 | * |
---|
25 | 33 | * @ccwchain_list is the head of a ccwchain list, that contents the |
---|
26 | 34 | * translated result of the guest channel program that pointed out by |
---|
.. | .. |
---|
30 | 38 | struct list_head ccwchain_list; |
---|
31 | 39 | union orb orb; |
---|
32 | 40 | struct device *mdev; |
---|
| 41 | + bool initialized; |
---|
| 42 | + struct ccw1 *guest_cp; |
---|
33 | 43 | }; |
---|
34 | 44 | |
---|
35 | 45 | extern int cp_init(struct channel_program *cp, struct device *mdev, |
---|