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:35 +0100
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-03-31 12:55:07 +0200
commit4e149e431a2858b86b4f9c801b2a4dde50c929f9 (patch)
treea7547d4f98ea5e31a7516806e32feeaaa41b14be /drivers/s390/cio/vfio_ccw_private.h
parentvfio: ccw: introduce ccw_io_region (diff)
downloadlinux-dev-4e149e431a2858b86b4f9c801b2a4dde50c929f9.tar.xz
linux-dev-4e149e431a2858b86b4f9c801b2a4dde50c929f9.zip
vfio: ccw: handle ccw command request
We implement the basic ccw command handling infrastructure here: 1. Translate the ccw commands. 2. Issue the translated ccw commands to the device. 3. Once we get the execution result, update the guest SCSW with it. Acked-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Message-Id: <20170317031743.40128-9-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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/s390/cio/vfio_ccw_private.h b/drivers/s390/cio/vfio_ccw_private.h
index 359e96ba9c6c..79e53378f212 100644
--- a/drivers/s390/cio/vfio_ccw_private.h
+++ b/drivers/s390/cio/vfio_ccw_private.h
@@ -10,9 +10,11 @@
#ifndef _VFIO_CCW_PRIVATE_H_
#define _VFIO_CCW_PRIVATE_H_
+#include <linux/completion.h>
#include <linux/vfio_ccw.h>
#include "css.h"
+#include "vfio_ccw_cp.h"
/**
* struct vfio_ccw_private
@@ -22,6 +24,11 @@
* @mdev: pointer to the mediated device
* @nb: notifier for vfio events
* @io_region: MMIO region to input/output I/O arguments/results
+ * @wait_q: wait for interrupt
+ * @intparm: record current interrupt parameter, used for wait interrupt
+ * @cp: channel program for the current I/O operation
+ * @irb: irb info received from interrupt
+ * @scsw: scsw info
*/
struct vfio_ccw_private {
struct subchannel *sch;
@@ -30,11 +37,18 @@ struct vfio_ccw_private {
struct mdev_device *mdev;
struct notifier_block nb;
struct ccw_io_region io_region;
+
+ wait_queue_head_t wait_q;
+ u32 intparm;
+ struct channel_program cp;
+ struct irb irb;
+ union scsw scsw;
} __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);
+extern int vfio_ccw_sch_cmd_request(struct vfio_ccw_private *private);
#endif