aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-05-10 11:21:34 +0300
committerMarcelo Tosatti <mtosatti@redhat.com>2010-05-11 14:03:44 -0300
commit4513d9232badcc5039d69dae946054ba2682c258 (patch)
tree5eb6a23d01375e7123a0674bc48f48171c5c5fe2 /kvm-all.c
parent0af691d779965663abdd7bc708c2ad7bce2f6da0 (diff)
downloadqemu-4513d9232badcc5039d69dae946054ba2682c258.zip
qemu-4513d9232badcc5039d69dae946054ba2682c258.tar.gz
qemu-4513d9232badcc5039d69dae946054ba2682c258.tar.bz2
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 <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c2
1 files changed, 2 insertions, 0 deletions
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.