[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 37/46] s390x/css: IO instr handler ending control
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 37/46] s390x/css: IO instr handler ending control |
Date: |
Fri, 20 Oct 2017 13:54:09 +0200 |
From: Halil Pasic <address@hidden>
CSS code needs to tell the IO instruction handlers located in ioinst.c
how the emulated instruction should be ended. Currently this is done by
returning generic (POSIX) error codes, and mapping them to outcomes like
condition codes. This makes bugs easy to create and hard to recognize.
As a preparation for moving away from (mis)using generic error codes for
flow control let us introduce a type which tells the instruction
handler function how to end the instruction, in a more straight-forward
and less ambiguous way.
Signed-off-by: Halil Pasic <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Dong Jia Shi <address@hidden>
[CH: cosmetic changes]
Signed-off-by: Cornelia Huck <address@hidden>
---
include/hw/s390x/css.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h
index 69b374730e..08ad1a14cf 100644
--- a/include/hw/s390x/css.h
+++ b/include/hw/s390x/css.h
@@ -99,6 +99,22 @@ typedef struct CcwDataStream {
hwaddr cda;
} CcwDataStream;
+/*
+ * IO instructions conclude according to this. Currently we have only
+ * cc codes. Valid values are 0, 1, 2, 3 and the generic semantic for
+ * IO instructions is described briefly. For more details consult the PoP.
+ */
+typedef enum IOInstEnding {
+ /* produced expected result */
+ IOINST_CC_EXPECTED = 0,
+ /* status conditions were present or produced alternate result */
+ IOINST_CC_STATUS_PRESENT = 1,
+ /* inst. ineffective because busy with previously initiated function */
+ IOINST_CC_BUSY = 2,
+ /* inst. ineffective because not operational */
+ IOINST_CC_NOT_OPERATIONAL = 3
+} IOInstEnding;
+
typedef struct SubchDev SubchDev;
struct SubchDev {
/* channel-subsystem related things: */
--
2.13.6
- [qemu-s390x] [PULL 28/46] s390x/cpumodel: allow to enable SENSE RUNNING STATUS for qemu, (continued)
- [qemu-s390x] [PULL 28/46] s390x/cpumodel: allow to enable SENSE RUNNING STATUS for qemu, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 27/46] s390x/tcg: switch to new SIGP handling code, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 30/46] s390x/tcg: refactor stfl(e) to use s390_get_feat_block(), Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 31/46] target/s390x: special handling when starting a CPU with WAIT PSW, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 29/46] s390x/tcg: unlock NMI, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 32/46] virtio-ccw: Add the virtio-input devices for CCW bus, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 33/46] s390x/MAINTAINERS: add mailing list, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 34/46] s390x/event-facility: variable-length event masks, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 35/46] s390x: fix cpu object referrence leak in s390x_new_cpu(), Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 36/46] s390x: move s390x_new_cpu() into board code, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 37/46] s390x/css: IO instr handler ending control,
Cornelia Huck <=
- [qemu-s390x] [PULL 39/46] s390x: refactor error handling for XSCH handler, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 38/46] s390x: improve error handling for SSCH and RSCH, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 40/46] s390x: refactor error handling for CSCH handler, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 41/46] s390x: refactor error handling for HSCH handler, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 42/46] s390x: refactor error handling for MSCH handler, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 44/46] tests: Enable the very simple virtio tests on s390x, too, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 43/46] libqtest: Add qtest_[v]startf(), Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 45/46] accel/tcg: allow to invalidate a write TLB entry immediately, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 46/46] s390x/tcg: low-address protection support, Cornelia Huck, 2017/10/20
- Re: [qemu-s390x] [PULL 00/46] more s390x patches for 2.11, Peter Maydell, 2017/10/20