]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - drivers/s390/cio/vfio_ccw_cp.h
2 * channel program interfaces
4 * Copyright IBM Corp. 2017
6 * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
7 * Xiao Feng Ren <renxiaof@linux.vnet.ibm.com>
10 #ifndef _VFIO_CCW_CP_H_
11 #define _VFIO_CCW_CP_H_
19 * struct channel_program - manage information for channel program
20 * @ccwchain_list: list head of ccwchains
21 * @orb: orb for the currently processed ssch request
22 * @mdev: the mediated device to perform page pinning/unpinning
24 * @ccwchain_list is the head of a ccwchain list, that contents the
25 * translated result of the guest channel program that pointed out by
26 * the iova parameter when calling cp_init.
28 struct channel_program
{
29 struct list_head ccwchain_list
;
34 extern int cp_init(struct channel_program
*cp
, struct device
*mdev
,
36 extern void cp_free(struct channel_program
*cp
);
37 extern int cp_prefetch(struct channel_program
*cp
);
38 extern union orb
*cp_get_orb(struct channel_program
*cp
, u32 intparm
, u8 lpm
);
39 extern void cp_update_scsw(struct channel_program
*cp
, union scsw
*scsw
);
40 extern bool cp_iova_pinned(struct channel_program
*cp
, u64 iova
);