diff options
author | David Hildenbrand <david@redhat.com> | 2017-09-28 22:37:04 +0200 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2017-10-20 13:32:10 +0200 |
commit | 11b0079cec6b1f46ba76cca634051bee4474d323 (patch) | |
tree | f4e730ce7452dcd9772b35c30e8d40f21b6d620b /target/s390x/misc_helper.c | |
parent | b376a5545a73c4ae5d19741afa7b2074d31a3a3f (diff) |
s390x/tcg: switch to new SIGP handling code
This effectively enables experimental SMP support. Floating interrupts are
still a mess, so allow it but print a big warning. There also seems
to be a problem with CPU hotplug (after the main loop started).
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170928203708.9376-27-david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
[CH: changed insn-data.def as pointed out by Richard]
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/misc_helper.c')
-rw-r--r-- | target/s390x/misc_helper.c | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c index 0b93381188..0b3613ea5f 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/misc_helper.c @@ -319,44 +319,14 @@ uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0, } uint32_t HELPER(sigp)(CPUS390XState *env, uint64_t order_code, uint32_t r1, - uint64_t cpu_addr) + uint32_t r3) { - int cc = SIGP_CC_ORDER_CODE_ACCEPTED; + int cc; - HELPER_LOG("%s: %016" PRIx64 " %08x %016" PRIx64 "\n", - __func__, order_code, r1, cpu_addr); - - /* Remember: Use "R1 or R1 + 1, whichever is the odd-numbered register" - as parameter (input). Status (output) is always R1. */ - - switch (order_code & SIGP_ORDER_MASK) { - case SIGP_SET_ARCH: - /* switch arch */ - break; - case SIGP_SENSE: - /* enumerate CPU status */ - if (cpu_addr) { - /* XXX implement when SMP comes */ - return 3; - } - env->regs[r1] &= 0xffffffff00000000ULL; - cc = 1; - break; -#if !defined(CONFIG_USER_ONLY) - case SIGP_RESTART: - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); - cpu_loop_exit(CPU(s390_env_get_cpu(env))); - break; - case SIGP_STOP: - qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); - cpu_loop_exit(CPU(s390_env_get_cpu(env))); - break; -#endif - default: - /* unknown sigp */ - fprintf(stderr, "XXX unknown sigp: 0x%" PRIx64 "\n", order_code); - cc = SIGP_CC_NOT_OPERATIONAL; - } + /* TODO: needed to inject interrupts - push further down */ + qemu_mutex_lock_iothread(); + cc = handle_sigp(env, order_code & SIGP_ORDER_MASK, r1, r3); + qemu_mutex_unlock_iothread(); return cc; } |