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: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2] s390x/cpu: expose the guest crash information
Date: Wed, 20 Sep 2017 09:34:37 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 09/20/2017 04:14 AM, Cornelia Huck wrote:
> 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.
>>

>>       "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: signature.asc
Description: OpenPGP digital signature


reply via email to

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