mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
kvm: Add kvm system event crash handler
KVM kernel can send guest crash events into userspace. Appropriate guest crash handler is called when kernel guest crash event received. Guest crash event recognized by a KVM_SYSTEM_EVENT_CRASH type of system event. Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Andreas Färber <afaerber@suse.de> Message-Id: <1435924905-8926-11-git-send-email-den@openvz.org> [Rebase: add lock/unlock iothread around qemu_system_guest_panicked - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
bac05aa9a7
commit
7c207b9046
1 changed files with 6 additions and 0 deletions
|
|
@ -1889,6 +1889,12 @@ int kvm_cpu_exec(CPUState *cpu)
|
||||||
qemu_system_reset_request();
|
qemu_system_reset_request();
|
||||||
ret = EXCP_INTERRUPT;
|
ret = EXCP_INTERRUPT;
|
||||||
break;
|
break;
|
||||||
|
case KVM_SYSTEM_EVENT_CRASH:
|
||||||
|
qemu_mutex_lock_iothread();
|
||||||
|
qemu_system_guest_panicked();
|
||||||
|
qemu_mutex_unlock_iothread();
|
||||||
|
ret = 0;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
DPRINTF("kvm_arch_handle_exit\n");
|
DPRINTF("kvm_arch_handle_exit\n");
|
||||||
ret = kvm_arch_handle_exit(cpu, run);
|
ret = kvm_arch_handle_exit(cpu, run);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue