aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/excp_helper.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-09-28 22:36:40 +0200
committerCornelia Huck <cohuck@redhat.com>2017-10-20 13:32:10 +0200
commitd516f74c99b1a2c289cfba0bacf125cbc9b681e3 (patch)
treeac056df00a66d646c8ad3d6ac97f3d60afb49e74 /target/s390x/excp_helper.c
parent6482b0ffd12ce83810c10b1a3884a75eba2ade1a (diff)
s390x/tcg: cleanup service interrupt injection
There are still some leftovers from old virtio interrupts in there. Most importantly, we don't have to queue service interrupts anymore. Just like KVM, we can simply multiplex the SCLP service interrupts and avoid the queue. Also, now only valid parameters/cpu_addr will be stored on service interrupts. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170928203708.9376-3-david@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/excp_helper.c')
-rw-r--r--target/s390x/excp_helper.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c
index b58486b98b..f5851069b5 100644
--- a/target/s390x/excp_helper.c
+++ b/target/s390x/excp_helper.c
@@ -241,7 +241,6 @@ static void do_ext_interrupt(CPUS390XState *env)
S390CPU *cpu = s390_env_get_cpu(env);
uint64_t mask, addr;
LowCore *lowcore;
- ExtQueue *q;
if (!(env->psw.mask & PSW_MASK_EXT)) {
cpu_abort(CPU(cpu), "Ext int w/o ext mask\n");
@@ -258,20 +257,15 @@ static void do_ext_interrupt(CPUS390XState *env)
lowcore->cpu_addr = 0;
env->pending_int &= ~INTERRUPT_EXT_CPU_TIMER;
} else if (env->pending_int & INTERRUPT_EXT_SERVICE) {
- g_assert(env->ext_index >= 0);
/*
* FIXME: floating IRQs should be considered by all CPUs and
* shuld not get cleared by CPU reset.
*/
- q = &env->ext_queue[env->ext_index];
- lowcore->ext_int_code = cpu_to_be16(q->code);
- lowcore->ext_params = cpu_to_be32(q->param);
- lowcore->ext_params2 = cpu_to_be64(q->param64);
- lowcore->cpu_addr = cpu_to_be16(env->core_id | VIRTIO_SUBCODE_64);
- env->ext_index--;
- if (env->ext_index == -1) {
- env->pending_int &= ~INTERRUPT_EXT_SERVICE;
- }
+ lowcore->ext_int_code = cpu_to_be16(EXT_SERVICE);
+ lowcore->ext_params = cpu_to_be32(env->service_param);
+ lowcore->cpu_addr = 0;
+ env->service_param = 0;
+ env->pending_int &= ~INTERRUPT_EXT_SERVICE;
} else {
g_assert_not_reached();
}