[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v4] s390x/cpu: expose the guest crash informatio
From: |
Christian Borntraeger |
Subject: |
Re: [qemu-s390x] [PATCH v4] s390x/cpu: expose the guest crash information |
Date: |
Mon, 5 Feb 2018 15:43:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
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"