qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] s390x/cpu: expose the guest crash informatio


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH v2] s390x/cpu: expose the guest crash information
Date: Wed, 20 Sep 2017 11:14:31 +0200

On Tue, 19 Sep 2017 09:43:14 +0200
Christian Borntraeger <address@hidden> wrote:

> From: Jing Liu <address@hidden>
> 
> This patch is the s390 implementation of guest crash information, similar
> to commit d187e08dc4 ("i386/cpu: add crash-information QOM property") and
> the related commits. We will detect several crash reasons, with the
> "disabled wait" being the most important one, since this is used by all
> s390 guests as a "panic like" notification.
> 
> Demonstrate the these ways with examples as follows.

s/the these/these/

> 
>   1. crash-information QOM property;
> 
>   Run qemu with -qmp unix:qmp-sock,server, then use utility "qmp-shell"
>   to execute "qom-get" command, and might get the result like,
> 
>   (QEMU) qom-get path=/machine/cpu[0]/ property=crash-information
>   {"return": {"psw-addr": 1105350, "psw-mask": 562956395872256, "reason":
>    "disabled wait", "type": "s390"}}
> 
>   2. GUEST_PANICKED event reporting;
> 
>   Run qemu with a socket option, and telnet or nc to that,
>   -chardev socket,id=qmp,port=4444,host=localhost,server \
>   -mon chardev=qmp,mode=control,pretty=on \
>   Negotiating the mode by { "execute": "qmp_capabilities" }, and the crash
>   information will be reported on a guest crash event like,
> 
>   {
>       "timestamp": {
>           "seconds": 1499931739,
>           "microseconds": 961296
>       },
>       "event": "GUEST_PANICKED",
>       "data": {
>           "action": "pause",
>           "info": {
>               "psw-addr": 1105350,
>               "reason": "disabled wait",
>               "psw-mask": 562956395872256,
>               "type": "s390"
>           }
>       }
>   }

Out of scope for this patch, but is there a way to print the values as
hex in the monitor?

> 
>   3. log;
> 
>   Run qemu with the parameters: -D <logfile> -d guest_errors, to
>   specify the logfile and log item. The results might be,
> 
>   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  
>   Guest crashed
>   S390 crash parameters: (0x2000180000000 0x10ddc6)

Would it make sense to pad with zeroes, for readability?

>   S390 crash reason: disabled wait
>   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  
> 
> Signed-off-by: Jing Liu <address@hidden>
> Reviewed-by: Christian Borntraeger <address@hidden>
> Signed-off-by: Christian Borntraeger <address@hidden>
> [minor fixes due to upstream feedback]
> ---
> V1->V2:
>       - rename kvm-s390 to s390 in all places
>       - add "loop" to the crash reasons where appropriate
>       - use "-" instead of "_" for qapi
> 
>  qapi/run-state.json | 19 ++++++++++++++++--
>  target/s390x/cpu.c  | 57 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  target/s390x/cpu.h  |  6 ++++++
>  target/s390x/kvm.c  | 29 +++++++++++++++++++++------
>  vl.c                |  6 ++++++
>  5 files changed, 109 insertions(+), 8 deletions(-)

No further comments over what others have already said.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]