summaryrefslogtreecommitdiff
path: root/hw/s390x/s390-ccw.c
diff options
context:
space:
mode:
authorXiao Feng Ren <renxiaof@linux.vnet.ibm.com>2017-05-17 02:48:11 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-05-19 12:29:01 +0200
commitbab482d7405f9fe3cac9c213d60f9ca9442c047b (patch)
tree7dc7df9f07152940bbfb2ee1034a982f44b66682 /hw/s390x/s390-ccw.c
parent8ca2b376b47fff58f7ab6f16d86a66d4af3a2be2 (diff)
s390x/css: ccw translation infrastructure
Implement a basic infrastructure of handling channel I/O instruction interception for passed through subchannels: 1. Branch the code path of instruction interception handling by SubChannel type. 2. For a passed-through subchannel, issue the ORB to kernel to do ccw translation and perform an I/O operation. 3. Assign different condition code based on the I/O result, or trigger a program check. Signed-off-by: Xiao Feng Ren <renxiaof@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Message-Id: <20170517004813.58227-12-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/s390-ccw.c')
-rw-r--r--hw/s390x/s390-ccw.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c
index e2b1973fda..8614dda6f8 100644
--- a/hw/s390x/s390-ccw.c
+++ b/hw/s390x/s390-ccw.c
@@ -18,6 +18,17 @@
#include "hw/s390x/css-bridge.h"
#include "hw/s390x/s390-ccw.h"
+int s390_ccw_cmd_request(ORB *orb, SCSW *scsw, void *data)
+{
+ S390CCWDeviceClass *cdc = S390_CCW_DEVICE_GET_CLASS(data);
+
+ if (cdc->handle_request) {
+ return cdc->handle_request(orb, scsw, data);
+ } else {
+ return -ENOSYS;
+ }
+}
+
static void s390_ccw_get_dev_info(S390CCWDevice *cdev,
char *sysfsdev,
Error **errp)
@@ -72,6 +83,7 @@ static void s390_ccw_realize(S390CCWDevice *cdev, char *sysfsdev, Error **errp)
goto out_mdevid_free;
}
sch->driver_data = cdev;
+ sch->do_subchannel_work = do_subchannel_work_passthrough;
ccw_dev->sch = sch;
ret = css_sch_build_schib(sch, &cdev->hostid);