From bab482d7405f9fe3cac9c213d60f9ca9442c047b Mon Sep 17 00:00:00 2001 From: Xiao Feng Ren Date: Wed, 17 May 2017 02:48:11 +0200 Subject: 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 Signed-off-by: Dong Jia Shi Message-Id: <20170517004813.58227-12-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck --- target/s390x/ioinst.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'target/s390x/ioinst.c') diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index 590bfa4..62a7771 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -244,6 +244,15 @@ void ioinst_handle_ssch(S390CPU *cpu, uint64_t reg1, uint32_t ipb) case -EBUSY: cc = 2; break; + case -EFAULT: + /* + * TODO: + * I'm wondering whether there is something better + * to do for us here (like setting some device or + * subchannel status). + */ + program_interrupt(env, PGM_ADDRESSING, 4); + return; case 0: cc = 0; break; -- cgit v1.1