From 4513d9232badcc5039d69dae946054ba2682c258 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Mon, 10 May 2010 11:21:34 +0300 Subject: Do not stop VM if emulation failed in userspace. Continue vcpu execution in case emulation failure happened while vcpu was in userspace. In this case #UD will be injected into the guest allowing guest OS to kill offending process and continue. Signed-off-by: Gleb Natapov Signed-off-by: Marcelo Tosatti --- kvm-all.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kvm-all.c') diff --git a/kvm-all.c b/kvm-all.c index d06980c..c238f54 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -764,6 +764,8 @@ static void kvm_handle_internal_error(CPUState *env, struct kvm_run *run) cpu_dump_state(env, stderr, fprintf, 0); if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) { fprintf(stderr, "emulation failure\n"); + if (!kvm_arch_stop_on_emulation_error(env)) + return; } /* FIXME: Should trigger a qmp message to let management know * something went wrong. -- cgit v1.1