diff options
author | Anton Nefedov <anton.nefedov@virtuozzo.com> | 2017-02-14 09:25:23 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-02-16 15:30:49 +0100 |
commit | c86f106b857dd8922e29ec746a8dd47e8a15ebbd (patch) | |
tree | d2140a86198cce1cb27cbe2a0c8d2065fb65c7f7 /include/qom/cpu.h | |
parent | d187e08dc4d0793dab1a9747b72b17a1cf0d3e43 (diff) | |
download | qemu-c86f106b857dd8922e29ec746a8dd47e8a15ebbd.zip |
report guest crash information in GUEST_PANICKED event
it's not very convenient to use the crash-information property interface,
so provide a CPU class callback to get the guest crash information, and pass
that information in the event
Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Message-Id: <1487053524-18674-3-git-send-email-den@openvz.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qom/cpu.h')
-rw-r--r-- | include/qom/cpu.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 45bcf21a21..f69b2407ea 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -158,6 +158,7 @@ typedef struct CPUClass { uint8_t *buf, int len, bool is_write); void (*dump_state)(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf, int flags); + GuestPanicInformation* (*get_crash_info)(CPUState *cpu); void (*dump_statistics)(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf, int flags); int64_t (*get_arch_id)(CPUState *cpu); @@ -472,6 +473,15 @@ int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu, void *opaque); /** + * cpu_get_crash_info: + * @cpu: The CPU to get crash information for + * + * Gets the previously saved crash information. + * Caller is responsible for freeing the data. + */ +GuestPanicInformation *cpu_get_crash_info(CPUState *cpu); + +/** * CPUDumpFlags: * @CPU_DUMP_CODE: * @CPU_DUMP_FPU: dump FPU register state, not just integer |