aboutsummaryrefslogtreecommitdiffstats
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:33 +0100
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-03-31 12:55:06 +0200
commit84cd8fc48478b5e67b3f1600717299e11430a67e (patch)
treea6654495414878b703656bb97c0557746d4b00ed /drivers/s390/cio/vfio_ccw_private.h
parentvfio: ccw: introduce channel program interfaces (diff)
downloadlinux-dev-84cd8fc48478b5e67b3f1600717299e11430a67e.tar.xz
linux-dev-84cd8fc48478b5e67b3f1600717299e11430a67e.zip
vfio: ccw: register vfio_ccw to the mediated device framework
To make vfio support subchannel devices, we need to leverage the mediated device framework to create a mediated device for the subchannel device. This registers the subchannel device to the mediated device framework during probe to enable mediated device creation. Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Message-Id: <20170317031743.40128-7-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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/s390/cio/vfio_ccw_private.h b/drivers/s390/cio/vfio_ccw_private.h
index 38d69a59cb12..5afb3ba5c7b5 100644
--- a/drivers/s390/cio/vfio_ccw_private.h
+++ b/drivers/s390/cio/vfio_ccw_private.h
@@ -16,10 +16,21 @@
* struct vfio_ccw_private
* @sch: pointer to the subchannel
* @completion: synchronization helper of the I/O completion
+ * @avail: available for creating a mediated device
+ * @mdev: pointer to the mediated device
+ * @nb: notifier for vfio events
*/
struct vfio_ccw_private {
struct subchannel *sch;
struct completion *completion;
+ atomic_t avail;
+ struct mdev_device *mdev;
+ struct notifier_block nb;
} __aligned(8);
+extern int vfio_ccw_mdev_reg(struct subchannel *sch);
+extern void vfio_ccw_mdev_unreg(struct subchannel *sch);
+
+extern int vfio_ccw_sch_quiesce(struct subchannel *sch);
+
#endif