summaryrefslogtreecommitdiff
path: root/vl.c
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 /vl.c
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 'vl.c')
-rw-r--r--vl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index a05671d548..5993270185 100644
--- a/vl.c
+++ b/vl.c
@@ -1679,18 +1679,23 @@ void qemu_system_reset(bool report)
cpu_synchronize_all_post_reset();
}
-void qemu_system_guest_panicked(void)
+void qemu_system_guest_panicked(GuestPanicInformation *info)
{
if (current_cpu) {
current_cpu->crash_occurred = true;
}
- qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, &error_abort);
+ qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE,
+ !!info, info, &error_abort);
vm_stop(RUN_STATE_GUEST_PANICKED);
if (!no_shutdown) {
qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_POWEROFF,
- &error_abort);
+ !!info, info, &error_abort);
qemu_system_shutdown_request();
}
+
+ if (info) {
+ qapi_free_GuestPanicInformation(info);
+ }
}
void qemu_system_reset_request(void)