aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/cpu.h
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-06-09 16:21:56 +0200
committerRichard Henderson <rth@twiddle.net>2017-06-13 11:09:39 -0700
commitbecf8217deb2afc347d5172d9f30c8a8964b8b27 (patch)
tree47f7da6a3210b63ee7346bbf5f143abc9358d7f3 /target/s390x/cpu.h
parent465aec461726d5157d458acee94584f8cdfbe4b7 (diff)
target/s390x: rework PGM interrupt psw.addr handling
We can tell from the program interrupt code, whether a program interrupt has to forward the address in the PGM new PSW (suppressing/terminated/completed) to point at the next instruction, or if it is nullifying and the PSW address does not have to be incremented. So let's not modify the PSW address outside of the injection path and handle this internally. We just have to handle instruction length auto detection if no valid instruction length can be provided. This should fix various program interrupt injection paths, where the PSW was not properly forwarded. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170609142156.18767-3-david@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/s390x/cpu.h')
-rw-r--r--target/s390x/cpu.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index a4d31df2b5..2954974dac 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -460,11 +460,6 @@ static inline bool get_per_in_range(CPUS390XState *env, uint64_t addr)
}
#ifndef CONFIG_USER_ONLY
-/* In several cases of runtime exceptions, we havn't recorded the true
- instruction length. Use these codes when raising exceptions in order
- to re-compute the length by examining the insn in memory. */
-#define ILEN_LATER 0x20
-#define ILEN_LATER_INC 0x21
void trigger_pgm_exception(CPUS390XState *env, uint32_t code, uint32_t ilen);
#endif
@@ -1133,6 +1128,8 @@ uint32_t set_cc_nz_f128(float128 v);
int handle_diag_288(CPUS390XState *env, uint64_t r1, uint64_t r3);
void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3);
#endif
+/* automatically detect the instruction length */
+#define ILEN_AUTO 0xff
void program_interrupt(CPUS390XState *env, uint32_t code, int ilen);
void QEMU_NORETURN runtime_exception(CPUS390XState *env, int excp,
uintptr_t retaddr);