From b1ab5f6068c059b1357209c1dbeaac772184977d Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Thu, 28 Sep 2017 22:37:02 +0200 Subject: s390x/tcg: implement STOP and RESET interrupts for TCG Implement them like KVM implements/handles them. Both can only be triggered via SIGP instructions. RESET has (almost) the lowest priority if the CPU is running, and the highest if the CPU is STOPPED. This is handled in SIGP code already. On delivery, we only have to care about the "CPU running" scenario. STOP is defined to be delivered after all other interrupts have been delivered. Therefore it has the actual lowest priority. As both can wake up a CPU if sleeping, indicate them correctly to external code (e.g. cpu_has_work()). Signed-off-by: David Hildenbrand Message-Id: <20170928203708.9376-25-david@redhat.com> Reviewed-by: Richard Henderson Signed-off-by: Cornelia Huck --- target/s390x/helper.c | 1 + 1 file changed, 1 insertion(+) (limited to 'target/s390x/helper.c') diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 2505f3aec0..c41aa4c4ff 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -202,6 +202,7 @@ void do_restart_interrupt(CPUS390XState *env) addr = be64_to_cpu(lowcore->restart_new_psw.addr); cpu_unmap_lowcore(lowcore); + env->pending_int &= ~INTERRUPT_RESTART; load_psw(env, mask, addr); } -- cgit v1.2.3