diff options
author | 2009-09-01 15:13:20 +0200 | |
---|---|---|
committer | 2009-09-01 11:39:00 -0300 | |
commit | 95f372710b2ab74f3eba6f3e99483311dacd3d46 (patch) | |
tree | 3aa4f38b4719980d7105b14f378244ac53ca794a /qemu-kvm.c | |
parent | Update kvm.h in qemu-kvm tree (diff) | |
download | qemu-kvm-95f372710b2ab74f3eba6f3e99483311dacd3d46.tar.gz qemu-kvm-95f372710b2ab74f3eba6f3e99483311dacd3d46.tar.bz2 qemu-kvm-95f372710b2ab74f3eba6f3e99483311dacd3d46.zip |
Handle emulation failure in userspace
Since we return to userspace from KVM on invalid state emulation failure, let
qemu handle it.
Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'qemu-kvm.c')
-rw-r--r-- | qemu-kvm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qemu-kvm.c b/qemu-kvm.c index 7349c8d5b..06efd4192 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1044,6 +1044,14 @@ int kvm_run(kvm_vcpu_context_t vcpu, void *env) r = kvm_s390_handle_reset(kvm, vcpu, run); break; #endif + case KVM_EXIT_INTERNAL_ERROR: + fprintf(stderr, "KVM internal error. Suberror: %d\n", + run->internal.suberror); + kvm_show_regs(vcpu); + if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) + fprintf(stderr, "emulation failure, check dmesg for details\n"); + abort(); + break; default: if (kvm_arch_run(vcpu)) { fprintf(stderr, "unhandled vm exit: 0x%x\n", run->exit_reason); |