diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2015-06-13 00:45:56 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-06-17 12:40:52 +0200 |
commit | 777c98c32ce577a9671b9267ff6e2802f69ebafd (patch) | |
tree | 1c6aece20307d708f01509a4d76867617e444385 /target-s390x/cpu.h | |
parent | d453d103831c966e7920f146eb3416e43b588f89 (diff) | |
download | qemu-777c98c32ce577a9671b9267ff6e2802f69ebafd.tar.gz qemu-777c98c32ce577a9671b9267ff6e2802f69ebafd.tar.bz2 qemu-777c98c32ce577a9671b9267ff6e2802f69ebafd.zip |
target-s390x: basic PER event handling
This patch add basic support to generate PER exceptions. It adds two
fields to the cpu structure to record for the PER address and PER
code & ATMID values. When an exception is triggered and a PER event is
pending, the two PER values are copied to the lowcore area.
At the end of an instruction, an helper is checking for a possible
pending PER event and triggers an exception in that case. For that to
work with branches, we need to disable TB chaining when PER is
activated. Fortunately it's already in the TB flags.
Finally in case of a SERVICE CALL exception, we need to trigger the PER
exception immediately after.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-s390x/cpu.h')
-rw-r--r-- | target-s390x/cpu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index d3137be4be..f830208d25 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -111,6 +111,9 @@ typedef struct CPUS390XState { uint32_t int_svc_code; uint32_t int_svc_ilen; + uint64_t per_address; + uint16_t per_perc_atmid; + uint64_t cregs[16]; /* control registers */ ExtQueue ext_queue[MAX_EXT_QUEUE]; |