From: Eric Blake <eblake@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>,
Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>,
David Hildenbrand <david@redhat.com>,
Jing Liu <liujbjl@linux.vnet.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
Alexander Graf <agraf@suse.de>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v2] s390x/cpu: expose the guest crash information
Date: Wed, 20 Sep 2017 09:34:37 -0500 [thread overview]
Message-ID: <8db42985-77cd-6be6-585f-de402fbc64ce@redhat.com> (raw)
In-Reply-To: <20170920111431.1435dacd.cohuck@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]
On 09/20/2017 04:14 AM, Cornelia Huck wrote:
> On Tue, 19 Sep 2017 09:43:14 +0200
> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>
>> From: Jing Liu <liujbjl@linux.vnet.ibm.com>
>>
>> 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.
>>
>> "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?
>
Sadly, no. JSON intentionally chose decimal-only as its numeric format,
so hex values can only be provided as JSON strings. And since pure JSON
doesn't even allow comments, it's tough to argue that we could modify
the JSON pretty-printer to even list a hex representation as a comment
alongside every integer (although it's hard to know without more context
which values are most useful as hex, so it may be noisier than expected
if every JSON number has that sort of comment).
>>
>> 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?
Here, you're asking about post-processing the JSON output - at which
point, yes, we can make whatever changes we want to the decimal data
passed over the wire to transform it into something more useful to the
reader.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
prev parent reply other threads:[~2017-09-20 14:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 7:43 [Qemu-devel] [PATCH v2] s390x/cpu: expose the guest crash information Christian Borntraeger
2017-09-19 13:04 ` Eric Blake
2017-11-07 11:00 ` QingFeng Hao
2017-11-07 19:35 ` Eric Blake
2017-11-08 6:36 ` QingFeng Hao
2017-09-19 13:06 ` David Hildenbrand
2017-09-19 13:27 ` Christian Borntraeger
2017-09-19 13:14 ` David Hildenbrand
2017-09-19 13:56 ` Christian Borntraeger
2017-09-19 14:39 ` David Hildenbrand
2017-09-20 9:14 ` Cornelia Huck
2017-09-20 11:23 ` Christian Borntraeger
2017-09-20 14:34 ` Eric Blake [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8db42985-77cd-6be6-585f-de402fbc64ce@redhat.com \
--to=eblake@redhat.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=liujbjl@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).