From c86f106b857dd8922e29ec746a8dd47e8a15ebbd Mon Sep 17 00:00:00 2001 From: Anton Nefedov Date: Tue, 14 Feb 2017 09:25:23 +0300 Subject: 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 Signed-off-by: Denis V. Lunev Message-Id: <1487053524-18674-3-git-send-email-den@openvz.org> Signed-off-by: Paolo Bonzini --- qom/cpu.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'qom/cpu.c') 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) { -- cgit v1.2.1