[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 09/30] s390x/tcg: handle WAIT PSWs during interru
From: |
David Hildenbrand |
Subject: |
[Qemu-devel] [PATCH v2 09/30] s390x/tcg: handle WAIT PSWs during interrupt injection |
Date: |
Thu, 28 Sep 2017 22:36:47 +0200 |
If we encounter a WAIT PSW, we have to halt immediately. Using
cpu_loop_exit() at this point feels wrong. Simply leaving
cs->exception_index set doesn't result in an immediate stop.
This is also necessary to properly handle SIGP STOP interrupts later.
The CPU_INTERRUPT_HALT will be processed immediately and properly set
the CPU to halted (also resetting cs->exception_index to EXCP_HLT)
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/excp_helper.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c
index f6747f3877..1a0d0770a9 100644
--- a/target/s390x/excp_helper.c
+++ b/target/s390x/excp_helper.c
@@ -467,6 +467,12 @@ void s390_cpu_do_interrupt(CPUState *cs)
do_mchk_interrupt(env);
break;
}
+
+ /* WAIT PSW during interrupt injection */
+ if (cs->exception_index == EXCP_HLT) {
+ /* don't trigger a cpu_loop_exit(), use an interrupt instead */
+ cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HALT);
+ }
cs->exception_index = -1;
/* we might still have pending interrupts, but not deliverable */
--
2.13.5
- [Qemu-devel] [PATCH v2 00/30] s390x: SMP for TCG, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 01/30] s390x/tcg: turn INTERRUPT_EXT into a mask, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 02/30] s390x/tcg: cleanup service interrupt injection, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 03/30] s390x/tcg: injection of emergency signals and external calls, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 04/30] s390x/tcg: rework checking for deliverable interrupts, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 05/30] s390x/tcg: take care of external interrupt subclasses, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 06/30] s390x/tcg: STOPPED cpus can never wake up, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 07/30] s390x/tcg: a CPU cannot switch state due to an interrupt, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 08/30] target/s390x: factor out handling of WAIT PSW into s390_handle_wait(), David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 09/30] s390x/tcg: handle WAIT PSWs during interrupt injection,
David Hildenbrand <=
- [Qemu-devel] [PATCH v2 10/30] target/s390x: interpret PSW_MASK_WAIT only for TCG, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 11/30] s390x/kvm: pass ipb directly into handle_sigp(), David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 12/30] s390x/kvm: generalize SIGP stop and restart interrupt injection, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 13/30] s390x/kvm: factor out storing of CPU status, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 14/30] s390x/kvm: factor out storing of adtl CPU status, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 15/30] s390x/kvm: drop two debug prints, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 16/30] s390x/kvm: factor out SIGP code into sigp.c, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 17/30] MAINTAINERS: use s390 KVM maintainers for target/s390x/sigp.c, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 18/30] s390x/kvm: factor out actual handling of STOP interrupts, David Hildenbrand, 2017/09/28
- [Qemu-devel] [PATCH v2 20/30] s390x/tcg: implement SIGP SENSE, David Hildenbrand, 2017/09/28