aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/cio/vfio_ccw_cp.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c
index 9a2a39df1056..c532939c1c3f 100644
--- a/drivers/s390/cio/vfio_ccw_cp.c
+++ b/drivers/s390/cio/vfio_ccw_cp.c
@@ -23,9 +23,13 @@
23#define CCWCHAIN_LEN_MAX 256 23#define CCWCHAIN_LEN_MAX 256
24 24
25struct pfn_array { 25struct pfn_array {
26 /* Starting guest physical I/O address. */
26 unsigned long pa_iova; 27 unsigned long pa_iova;
28 /* Array that stores PFNs of the pages need to pin. */
27 unsigned long *pa_iova_pfn; 29 unsigned long *pa_iova_pfn;
30 /* Array that receives PFNs of the pages pinned. */
28 unsigned long *pa_pfn; 31 unsigned long *pa_pfn;
32 /* Number of pages to pin/pinned from @pa_iova. */
29 int pa_nr; 33 int pa_nr;
30}; 34};
31 35
@@ -53,14 +57,8 @@ struct ccwchain {
53 * Attempt to pin user pages in memory. 57 * Attempt to pin user pages in memory.
54 * 58 *
55 * Usage of pfn_array: 59 * Usage of pfn_array:
56 * @pa->pa_iova starting guest physical I/O address. Assigned by caller. 60 * Any field in this structure should be initialized by caller.
57 * @pa->pa_iova_pfn array that stores PFNs of the pages need to pin. Allocated 61 * We expect @pa->pa_nr > 0, and its value will be assigned by callee.
58 * by caller.
59 * @pa->pa_pfn array that receives PFNs of the pages pinned. Allocated by
60 * caller.
61 * @pa->pa_nr number of pages from @pa->pa_iova to pin. Assigned by
62 * caller.
63 * number of pages pinned. Assigned by callee.
64 * 62 *
65 * Returns: 63 * Returns:
66 * Number of pages pinned on success. 64 * Number of pages pinned on success.