On 31/01/2017 10:46, Denis V. Lunev wrote:
> On 01/31/2017 06:43 PM, Paolo Bonzini wrote:
>>
>> On 31/01/2017 05:07, Denis V. Lunev wrote:
>>> From: Anton Nefedov <anton.nefe...@virtuozzo.com>
>>>
>>> Windows reports BSOD parameters through Hyper-V crash MSRs. This
>>> information is very useful for initial crash analysis and thus
>>> it would be nice to see it in the QEMU log file. There is suitable
>>> log mask for the purpose.
>>>
>>> Linux guest does not provide this information, but still it would
>>> be nice to log that we have crashed.
>> We tell libvirt that the guest crashed through a QMP event, so I think
>> this should be passed as arguments of the QMP event.  You could add:
>>
>> - a QAPI type GuestPanicInformation
>>
>> {'union': 'GuestPanicInformation',
>>  'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }
>>
>> {'struct': 'GuestPanicInformationHyperV',
>>  'data': { 'arg1': 'uint64',
>>            'arg2': 'uint64',
>>            'arg3': 'uint64',
>>            'arg4': 'uint64' } }
>>
>> - a QOM property on the CPU object, crash-information, whose getter
>> returns an error unless cpu->crash_occurred = true
>>
>> - an optional GuestPanicInformation argument to the GUEST_PANICKED
>> event, which is passed if the QOM property returns a non-error value
> I like the idea of the event but also want to have the log message.
> LOG_GUEST_ERROR level fits well to the idea at my opinion.

Sure, you can do that anyway.  It's just that a log message would go
unnoticed, while QMP events can be passed up to management.  Seeing
bugcheck information in the GUI can be cool (e.g. to find immediately if
you have an INACCESSIBLE_BOOT_DEVICE bugcheck). :)

Paolo

Reply via email to