[Qemu-devel] [PATCH v2 0/3] kvm: report available guest crash parameters

Denis V. Lunev posted 3 patches 7 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1486653206-14553-1-git-send-email-den@openvz.org
Test checkpatch passed
Test docker passed
Test s390x failed
There is a newer version of this series
hw/misc/pvpanic.c       |  2 +-
include/qom/cpu.h       | 10 +++++++++
include/sysemu/kvm.h    |  2 ++
include/sysemu/sysemu.h |  2 +-
kvm-all.c               |  3 ++-
qapi-schema.json        | 24 +++++++++++++++++++++
qapi/event.json         |  6 ++++--
qom/cpu.c               | 11 ++++++++++
stubs/Makefile.objs     |  1 +
stubs/kvm-crash.c       |  8 +++++++
target/i386/cpu.c       | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
target/i386/cpu.h       |  3 +++
target/i386/kvm.c       | 41 ++++++++++++++++++++++++++++++++++++
target/s390x/kvm.c      |  4 ++--
vl.c                    | 23 ++++++++++++++++++---
15 files changed, 185 insertions(+), 10 deletions(-)
create mode 100644 stubs/kvm-crash.c
[Qemu-devel] [PATCH v2 0/3] kvm: report available guest crash parameters
Posted by Denis V. Lunev 7 years, 2 months ago
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.

Changes since v1:
- patches resplit
- created property to query crash parameters
- crash parameters added to panic event

Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Marcelo Tosatti <mtosatti@redhat.com>
CC: Richard Henderson <rth@twiddle.net>
CC: Eduardo Habkost <ehabkost@redhat.com>
CC: Eric Blake <eblake@redhat.com>
CC: Markus Armbruster <armbru@redhat.com>

Anton Nefedov (3):
  i386/cpu: add crash-information QOM property
  report guest crash information in GUEST_PANICKED event
  vl: log available guest crash information

 hw/misc/pvpanic.c       |  2 +-
 include/qom/cpu.h       | 10 +++++++++
 include/sysemu/kvm.h    |  2 ++
 include/sysemu/sysemu.h |  2 +-
 kvm-all.c               |  3 ++-
 qapi-schema.json        | 24 +++++++++++++++++++++
 qapi/event.json         |  6 ++++--
 qom/cpu.c               | 11 ++++++++++
 stubs/Makefile.objs     |  1 +
 stubs/kvm-crash.c       |  8 +++++++
 target/i386/cpu.c       | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
 target/i386/cpu.h       |  3 +++
 target/i386/kvm.c       | 41 ++++++++++++++++++++++++++++++++++++
 target/s390x/kvm.c      |  4 ++--
 vl.c                    | 23 ++++++++++++++++++---
 15 files changed, 185 insertions(+), 10 deletions(-)
 create mode 100644 stubs/kvm-crash.c

-- 
2.7.4


Re: [Qemu-devel] [PATCH v2 0/3] kvm: report available guest crash parameters
Posted by Fam Zheng 7 years, 2 months ago
On Thu, 02/09 18:13, Denis V. Lunev wrote:
> 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.
> 
> Changes since v1:
> - patches resplit
> - created property to query crash parameters
> - crash parameters added to panic event

This has a compiling error:

/var/tmp/patchew-tester-tmp-fmkso1x2/src/hw/ppc/spapr_rtas.c: In function ‘rtas_ibm_os_term’:
/var/tmp/patchew-tester-tmp-fmkso1x2/src/hw/ppc/spapr_rtas.c:337:5: error: the address of ‘error_abort’ will always evaluate as ‘true’ [-Werror=address]
     qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, &error_abort);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/patchew-tester-tmp-fmkso1x2/src/hw/ppc/spapr_rtas.c:337:5: error: too few arguments to function ‘qapi_event_send_guest_panicked’
In file included from /var/tmp/patchew-tester-tmp-fmkso1x2/src/hw/ppc/spapr_rtas.c:42:0:
../qapi-event.h:48:6: note: declared here
 void qapi_event_send_guest_panicked(GuestPanicAction action, bool has_info, GuestPanicInformation *info, Error **errp);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
/var/tmp/patchew-tester-tmp-fmkso1x2/src/rules.mak:69: recipe for target 'hw/ppc/spapr_rtas.o' failed
make[1]: *** [hw/ppc/spapr_rtas.o] Error 1
Makefile:318: recipe for target 'subdir-ppc64-softmmu' failed


Re: [Qemu-devel] [PATCH v2 0/3] kvm: report available guest crash parameters
Posted by Denis V. Lunev 7 years, 2 months ago
On 02/09/2017 06:51 PM, Fam Zheng wrote:
> On Thu, 02/09 18:13, Denis V. Lunev wrote:
>> 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.
>>
>> Changes since v1:
>> - patches resplit
>> - created property to query crash parameters
>> - crash parameters added to panic event
> This has a compiling error:
>
> /var/tmp/patchew-tester-tmp-fmkso1x2/src/hw/ppc/spapr_rtas.c: In function ‘rtas_ibm_os_term’:
> /var/tmp/patchew-tester-tmp-fmkso1x2/src/hw/ppc/spapr_rtas.c:337:5: error: the address of ‘error_abort’ will always evaluate as ‘true’ [-Werror=address]
>      qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, &error_abort);
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/tmp/patchew-tester-tmp-fmkso1x2/src/hw/ppc/spapr_rtas.c:337:5: error: too few arguments to function ‘qapi_event_send_guest_panicked’
> In file included from /var/tmp/patchew-tester-tmp-fmkso1x2/src/hw/ppc/spapr_rtas.c:42:0:
> ../qapi-event.h:48:6: note: declared here
>  void qapi_event_send_guest_panicked(GuestPanicAction action, bool has_info, GuestPanicInformation *info, Error **errp);
>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> /var/tmp/patchew-tester-tmp-fmkso1x2/src/rules.mak:69: recipe for target 'hw/ppc/spapr_rtas.o' failed
> make[1]: *** [hw/ppc/spapr_rtas.o] Error 1
> Makefile:318: recipe for target 'subdir-ppc64-softmmu' failed
>
oops. will check other arches and resubmit. My fault.

Den