On 02/05/2018 03:12 PM, Christian Borntraeger wrote:
[...] > diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h > index a1123ad621..71414cc324 100644 > --- a/target/s390x/cpu.h > +++ b/target/s390x/cpu.h > @@ -77,6 +77,14 @@ typedef struct MchkQueue { > uint16_t type; > } MchkQueue; > > +/* Crash cases. */ > +enum crash_reasons { I should add a CRASH_REASON_UNKNOWN, > + CRASH_REASON_PGM, > + CRASH_REASON_EXT, > + CRASH_REASON_WAITPSW, > + CRASH_REASON_OPEREXC, > +}; > + > struct CPUS390XState { > uint64_t regs[16]; /* GP registers */ > /* > @@ -102,6 +110,8 @@ struct CPUS390XState { > > PSW psw; > > + enum crash_reasons crash_reason; > + as this gets zeroed on reset. If we ever get called from other code that does not set a crash reason we better say "unknown"