aboutsummaryrefslogtreecommitdiff
path: root/qom
diff options
context:
space:
mode:
authorAnton Nefedov <anton.nefedov@virtuozzo.com>2017-02-14 09:25:23 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2017-02-16 15:30:49 +0100
commitc86f106b857dd8922e29ec746a8dd47e8a15ebbd (patch)
treed2140a86198cce1cb27cbe2a0c8d2065fb65c7f7 /qom
parentd187e08dc4d0793dab1a9747b72b17a1cf0d3e43 (diff)
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 'qom')
-rw-r--r--qom/cpu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/qom/cpu.c b/qom/cpu.c
index 0e19b1aa21..ed87c50cea 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -218,6 +218,17 @@ static bool cpu_common_exec_interrupt(CPUState *cpu, int int_req)
return false;
}
+GuestPanicInformation *cpu_get_crash_info(CPUState *cpu)
+{
+ CPUClass *cc = CPU_GET_CLASS(cpu);
+ GuestPanicInformation *res = NULL;
+
+ if (cc->get_crash_info) {
+ res = cc->get_crash_info(cpu);
+ }
+ return res;
+}
+
void cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf,
int flags)
{