On 18.09.2017 22:00, David Hildenbrand wrote: > >> static void cpu_inject_io(S390CPU *cpu, uint16_t subchannel_id, >> diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c >> index ce8fda9d01..521dcc75f3 100644 >> --- a/target/s390x/sigp.c >> +++ b/target/s390x/sigp.c >> @@ -498,6 +498,7 @@ void do_stop_interrupt(CPUS390XState *env) >> s390_store_status(cpu, S390_STORE_STATUS_DEF_ADDR, true); >> } >> env->sigp_order = 0; >> + env->pending_int &= ~INTERRUPT_STOP; > > The *awesome* kvm-unit-tests (yes, the single sigp_stop() we do when > shutting down) just found a missing cpu_loop_exit() > > diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c > index ce8fda9d01..9aadc3ffdd 100644 > --- a/target/s390x/sigp.c > +++ b/target/s390x/sigp.c > @@ -498,6 +498,11 @@ void do_stop_interrupt(CPUS390XState *env) > s390_store_status(cpu, S390_STORE_STATUS_DEF_ADDR, true); > } > env->sigp_order = 0; > + env->pending_int &= ~INTERRUPT_STOP; > +#ifdef CONFIG_TCG > + /* the CPU has been stopped, we must immediately go out of the loop */ > + cpu_loop_exit(CPU(s390_env_get_cpu(env))); > +#endif > } >
if (tcg_enabled()) of course ... -- Thanks, David