From: Andrey Smetanin <asmetanin@xxxxxxxxxxxxx> KVM kernel can receive guest crash events. Patch code calls appropriate handler for kernel guest crash event. Guest crash event recognized by KVM_SYSTEM_EVENT_CRASH type of system event. Signed-off-by: Andrey Smetanin <asmetanin@xxxxxxxxxxxxx> Signed-off-by: Denis V. Lunev <den@xxxxxxxxxx> CC: Paolo Bonzini <pbonzini@xxxxxxxxxx> CC: Andreas Färber <afaerber@xxxxxxx> --- kvm-all.c | 4 ++++ linux-headers/linux/kvm.h | 1 + 2 files changed, 5 insertions(+) diff --git a/kvm-all.c b/kvm-all.c index 53e01d4..7a959b6 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1844,6 +1844,10 @@ int kvm_cpu_exec(CPUState *cpu) qemu_system_reset_request(); ret = EXCP_INTERRUPT; break; + case KVM_SYSTEM_EVENT_CRASH: + qemu_system_guest_panicked(); + ret = 0; + break; default: DPRINTF("kvm_arch_handle_exit\n"); ret = kvm_arch_handle_exit(cpu, run); diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index fad9e5c..409be37 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -317,6 +317,7 @@ struct kvm_run { struct { #define KVM_SYSTEM_EVENT_SHUTDOWN 1 #define KVM_SYSTEM_EVENT_RESET 2 +#define KVM_SYSTEM_EVENT_CRASH 3 __u32 type; __u64 flags; } system_event; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html