diff options
| author | zhenwei pi <pizhenwei@bytedance.com> | 2020-01-14 10:31:02 +0800 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-01-24 20:59:07 +0100 |
| commit | 7dc58deea79a343ac3adc5cadb97215086054c86 (patch) | |
| tree | 776cb4cf13cd8e08769346806385760e5857d977 /vl.c | |
| parent | 600d7b47e8f5085919fd1d1157f25950ea8dbc11 (diff) | |
| download | focaccia-qemu-7dc58deea79a343ac3adc5cadb97215086054c86.tar.gz focaccia-qemu-7dc58deea79a343ac3adc5cadb97215086054c86.zip | |
pvpanic: implement crashloaded event handling
Handle bit 1 write, then post event to monitor. Suggested by Paolo, declear a new event, using GUEST_PANICKED could cause upper layers to react by shutting down or rebooting the guest. In advance for extention, add GuestPanicInformation in event message. Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20200114023102.612548-3-pizhenwei@bytedance.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'vl.c')
| -rw-r--r-- | vl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vl.c b/vl.c index 71d3e7eefb..9f5f477400 100644 --- a/vl.c +++ b/vl.c @@ -1468,6 +1468,18 @@ void qemu_system_guest_panicked(GuestPanicInformation *info) } } +void qemu_system_guest_crashloaded(GuestPanicInformation *info) +{ + qemu_log_mask(LOG_GUEST_ERROR, "Guest crash loaded"); + + qapi_event_send_guest_crashloaded(GUEST_PANIC_ACTION_RUN, + !!info, info); + + if (info) { + qapi_free_GuestPanicInformation(info); + } +} + void qemu_system_reset_request(ShutdownCause reason) { if (no_reboot && reason != SHUTDOWN_CAUSE_SUBSYSTEM_RESET) { |