diff options
author | David Hildenbrand <david@redhat.com> | 2017-09-28 22:36:40 +0200 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2017-10-20 13:32:10 +0200 |
commit | d516f74c99b1a2c289cfba0bacf125cbc9b681e3 (patch) | |
tree | ac056df00a66d646c8ad3d6ac97f3d60afb49e74 /target/s390x/interrupt.c | |
parent | 6482b0ffd12ce83810c10b1a3884a75eba2ade1a (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/interrupt.c')
-rw-r--r-- | target/s390x/interrupt.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c index b9c30f86d7..edcc2e9d2d 100644 --- a/target/s390x/interrupt.c +++ b/target/s390x/interrupt.c @@ -54,22 +54,12 @@ void program_interrupt(CPUS390XState *env, uint32_t code, int ilen) } #if !defined(CONFIG_USER_ONLY) -void cpu_inject_ext(S390CPU *cpu, uint32_t code, uint32_t param, - uint64_t param64) +static void cpu_inject_service(S390CPU *cpu, uint32_t param) { CPUS390XState *env = &cpu->env; - if (env->ext_index == MAX_EXT_QUEUE - 1) { - /* ugh - can't queue anymore. Let's drop. */ - return; - } - - env->ext_index++; - assert(env->ext_index < MAX_EXT_QUEUE); - - env->ext_queue[env->ext_index].code = code; - env->ext_queue[env->ext_index].param = param; - env->ext_queue[env->ext_index].param64 = param64; + /* multiplexing is good enough for sclp - kvm does it internally as well*/ + env->service_param |= param; env->pending_int |= INTERRUPT_EXT_SERVICE; cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD); @@ -145,7 +135,7 @@ void s390_sclp_extint(uint32_t parm) } else { S390CPU *dummy_cpu = s390_cpu_addr2state(0); - cpu_inject_ext(dummy_cpu, EXT_SERVICE, parm, 0); + cpu_inject_service(dummy_cpu, parm); } } |