qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390x/tcg: clear local interrupts on reset normal
@ 2019-12-05 10:38 Cornelia Huck
  2019-12-05 10:56 ` Philippe Mathieu-Daudé
  2019-12-06  9:36 ` David Hildenbrand
  0 siblings, 2 replies; 5+ messages in thread
From: Cornelia Huck @ 2019-12-05 10:38 UTC (permalink / raw)
  To: Richard Henderson, David Hildenbrand
  Cc: qemu-s390x, Cornelia Huck, qemu-devel

We neglected to clean up pending interrupts and emergency signals;
fix that.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---

Noted while looking at the fixes for the kvm reset handling.

We now clear some fields twice in the paths for clear or initial reset;
but (a) we already do that for other fields and (b) it does not really
hurt. Maybe we should give the cpu structure some love in the future,
as it's not always clear whether some fields are tcg only.

---
 target/s390x/cpu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 829ce6ad5491..f2572961dc3a 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -133,6 +133,9 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type)
     case S390_CPU_RESET_NORMAL:
         env->pfault_token = -1UL;
         env->bpbc = false;
+        env->pending_int = 0;
+        env->external_call_addr = 0;
+        bitmap_zero(env->emergency_signals, S390_MAX_CPUS);
         break;
     default:
         g_assert_not_reached();
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-06 15:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 10:38 [PATCH] s390x/tcg: clear local interrupts on reset normal Cornelia Huck
2019-12-05 10:56 ` Philippe Mathieu-Daudé
2019-12-05 11:02   ` Cornelia Huck
2019-12-06  9:36 ` David Hildenbrand
2019-12-06 10:27   ` Cornelia Huck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).