[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 07/27] s390x/tcg: STOPPED cpus can never wake up
From: |
David Hildenbrand |
Subject: |
[Qemu-devel] [PATCH v1 07/27] s390x/tcg: STOPPED cpus can never wake up |
Date: |
Mon, 18 Sep 2017 17:59:52 +0200 |
Interrupts can't wake such CPUs up. SIGP from other CPUs has to be used
to toggle the state.
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/cpu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index f42e28ea25..64db086702 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -58,6 +58,12 @@ static bool s390_cpu_has_work(CPUState *cs)
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
+ /* STOPPED cpus can never wake up */
+ if (s390_cpu_get_state(cpu) != CPU_STATE_LOAD &&
+ s390_cpu_get_state(cpu) != CPU_STATE_OPERATING) {
+ return false;
+ }
+
return (cs->interrupt_request & CPU_INTERRUPT_HARD) &&
(env->psw.mask & PSW_MASK_EXT);
}
--
2.13.5
- Re: [Qemu-devel] [PATCH v1 03/27] target/s390x: get rid of next_core_id, (continued)
[Qemu-devel] [PATCH v1 05/27] s390/tcg: turn INTERRUPT_EXT into a mask, David Hildenbrand, 2017/09/18
[Qemu-devel] [PATCH v1 06/27] s390x/tcg: injection of emergency signals and extarnal calls, David Hildenbrand, 2017/09/18
[Qemu-devel] [PATCH v1 08/27] s390x/tcg: a CPU cannot switch state due to an interrupt, David Hildenbrand, 2017/09/18
[Qemu-devel] [PATCH v1 07/27] s390x/tcg: STOPPED cpus can never wake up,
David Hildenbrand <=
[Qemu-devel] [PATCH v1 09/27] target/s390x: factor out handling of WAIT PSW into handle_wait(), David Hildenbrand, 2017/09/18
[Qemu-devel] [PATCH v1 10/27] s390x/kvm: pass ipb directly into handle_sigp(), David Hildenbrand, 2017/09/18
[Qemu-devel] [PATCH v1 11/27] s390x/kvm: generalize SIGP stop and restart interrupt injection, David Hildenbrand, 2017/09/18