summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/vfio_ccw_private.h
diff options
context:
space:
mode:
authorDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>2017-03-17 04:17:34 +0100
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-03-31 12:55:06 +0200
commit060d2b5afcc4f9e2d61e2b059e648f569b8dba9a (patch)
treec33cfb0c149782f539391e3cbcc4cd021eb6886b /drivers/s390/cio/vfio_ccw_private.h
parent84cd8fc48478b5e67b3f1600717299e11430a67e (diff)
vfio: ccw: introduce ccw_io_region
To provide user-space a set of interfaces to: 1. pass in a ccw program to perform an I/O operation. 2. read back I/O results of the completed I/O operations. We introduce an MMIO region for the vfio-ccw device here. This region is defined to content: 1. areas to store arguments that an ssch required. 2. areas to store the I/O results. Using pwrite/pread to the device on this region, a user-space program could write/read data to/from the vfio-ccw device. Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Message-Id: <20170317031743.40128-8-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/vfio_ccw_private.h')
-rw-r--r--drivers/s390/cio/vfio_ccw_private.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/cio/vfio_ccw_private.h b/drivers/s390/cio/vfio_ccw_private.h
index 5afb3ba5c7b5..359e96ba9c6c 100644
--- a/drivers/s390/cio/vfio_ccw_private.h
+++ b/drivers/s390/cio/vfio_ccw_private.h
@@ -10,6 +10,8 @@
#ifndef _VFIO_CCW_PRIVATE_H_
#define _VFIO_CCW_PRIVATE_H_
+#include <linux/vfio_ccw.h>
+
#include "css.h"
/**
@@ -19,6 +21,7 @@
* @avail: available for creating a mediated device
* @mdev: pointer to the mediated device
* @nb: notifier for vfio events
+ * @io_region: MMIO region to input/output I/O arguments/results
*/
struct vfio_ccw_private {
struct subchannel *sch;
@@ -26,6 +29,7 @@ struct vfio_ccw_private {
atomic_t avail;
struct mdev_device *mdev;
struct notifier_block nb;
+ struct ccw_io_region io_region;
} __aligned(8);
extern int vfio_ccw_mdev_reg(struct subchannel *sch);