aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/interrupt.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-09-28 22:36:43 +0200
committerCornelia Huck <cohuck@redhat.com>2017-10-20 13:32:10 +0200
commit9dec238826361c9d7f60d26b88fd224512355c6e (patch)
tree34c0e689f7cbc6189d3479ccfc6c34dc5dbf159c /target/s390x/interrupt.c
parent8417f904bad50021b432dfea12613345d9fb1f68 (diff)
s390x/tcg: take care of external interrupt subclasses
We can now let go of INTERRUPT_EXT. When cr0 changes, we have to revalidate if we now have a pending external interrupt, just like when the PSW (or SYSTEM MASK only) changes. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170928203708.9376-6-david@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/interrupt.c')
-rw-r--r--target/s390x/interrupt.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c
index 0cb65a8c46..83a0f194f8 100644
--- a/target/s390x/interrupt.c
+++ b/target/s390x/interrupt.c
@@ -209,7 +209,37 @@ bool s390_cpu_has_ext_int(S390CPU *cpu)
return false;
}
- return env->pending_int & INTERRUPT_EXT;
+ if ((env->pending_int & INTERRUPT_EMERGENCY_SIGNAL) &&
+ (env->cregs[0] & CR0_EMERGENCY_SIGNAL_SC)) {
+ return true;
+ }
+
+ if ((env->pending_int & INTERRUPT_EXTERNAL_CALL) &&
+ (env->cregs[0] & CR0_EXTERNAL_CALL_SC)) {
+ return true;
+ }
+
+ if ((env->pending_int & INTERRUPT_EXTERNAL_CALL) &&
+ (env->cregs[0] & CR0_EXTERNAL_CALL_SC)) {
+ return true;
+ }
+
+ if ((env->pending_int & INTERRUPT_EXT_CLOCK_COMPARATOR) &&
+ (env->cregs[0] & CR0_CKC_SC)) {
+ return true;
+ }
+
+ if ((env->pending_int & INTERRUPT_EXT_CPU_TIMER) &&
+ (env->cregs[0] & CR0_CPU_TIMER_SC)) {
+ return true;
+ }
+
+ if ((env->pending_int & INTERRUPT_EXT_SERVICE) &&
+ (env->cregs[0] & CR0_SERVICE_SC)) {
+ return true;
+ }
+
+ return false;
}
bool s390_cpu_has_io_int(S390CPU *cpu)