aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/misc_helper.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-07-24 10:52:48 +0200
committerCornelia Huck <cohuck@redhat.com>2017-07-25 09:17:42 +0200
commite3cfd926f779ddaff52336431d30519e9386e962 (patch)
tree428f2287404cfb0dda0f028c63e783edea16f84b /target/s390x/misc_helper.c
parent3d6722051bc7876832003215533f36df9f33cc56 (diff)
target/s390x: Rework program_interrupt() and related functions
misc_helper.c won't be compiled with --disable-tcg anymore, but we still need the program_interrupt() function in that case. Move it to interrupt.c instead, and refactor it to re-use the code from trigger_pgm_exception() (for TCG) and enter_pgmcheck() (for KVM, which now got renamed to kvm_s390_program_interrupt() for clarity). Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1500886370-14572-4-git-send-email-thuth@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/misc_helper.c')
-rw-r--r--target/s390x/misc_helper.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index 6a90ad55cc..44c5c401fb 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -68,32 +68,6 @@ void HELPER(exception)(CPUS390XState *env, uint32_t excp)
cpu_loop_exit(cs);
}
-void program_interrupt(CPUS390XState *env, uint32_t code, int ilen)
-{
- S390CPU *cpu = s390_env_get_cpu(env);
-
- qemu_log_mask(CPU_LOG_INT, "program interrupt at %#" PRIx64 "\n",
- env->psw.addr);
-
- if (kvm_enabled()) {
-#ifdef CONFIG_KVM
- struct kvm_s390_irq irq = {
- .type = KVM_S390_PROGRAM_INT,
- .u.pgm.code = code,
- };
-
- kvm_s390_vcpu_interrupt(cpu, &irq);
-#endif
- } else {
- CPUState *cs = CPU(cpu);
-
- env->int_pgm_code = code;
- env->int_pgm_ilen = ilen;
- cs->exception_index = EXCP_PGM;
- cpu_loop_exit(cs);
- }
-}
-
#ifndef CONFIG_USER_ONLY
/* SCLP service call */