On Fri, 9 Feb 2018 12:25:43 +0000 Christian Borntraeger <borntrae...@de.ibm.com> wrote:
> 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 these ways with examples as follows. > > 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) (QEMU) qom-get path=/machine/unattached/device[0] \ > property=crash-information > {"return": {"core": 0, "reason": "disabled-wait", "psw-mask": > 562956395872256, \ > "type": "s390", "psw-addr": 1102832}} > > 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": 1518004739, > "microseconds": 552563 > }, > "event": "GUEST_PANICKED", > "data": { > "action": "pause", > "info": { > "core": 0, > "psw-addr": 1102832, > "reason": "disabled-wait", > "psw-mask": 562956395872256, > "type": "s390" > } > } > } > > 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 on cpu 0: disabled-wait > PSW: 0x0002000180000000 0x000000000010d3f0 > > Co-authored-by: Jing Liu <liuj...@linux.vnet.ibm.com> > Signed-off-by: Christian Borntraeger <borntrae...@de.ibm.com> > --- > qapi/run-state.json | 55 > +++++++++++++++++++++++++++++++++++++++++++++++++-- > target/s390x/cpu.c | 45 +++++++++++++++++++++++++++++++++++++++++ > target/s390x/cpu.h | 2 ++ > target/s390x/helper.c | 5 ++++- > target/s390x/kvm.c | 15 +++++++------- > vl.c | 11 +++++++++-- > 6 files changed, 120 insertions(+), 13 deletions(-) Looks good to me and I want to queue it; however, I'd still like an ack or two, especially for the qapi part.