* [PATCH] Handle emulation failure in userspace
@ 2009-09-01 13:13 Mohammed Gamal
2009-09-01 15:40 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Mohammed Gamal @ 2009-09-01 13:13 UTC (permalink / raw)
To: mtosatti; +Cc: kvm, avi, Mohammed Gamal
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>
---
qemu-kvm.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/qemu-kvm.c b/qemu-kvm.c
index b59e403..090a3ae 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1029,6 +1029,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);
--
1.6.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Handle emulation failure in userspace
2009-09-01 13:13 [PATCH] Handle emulation failure in userspace Mohammed Gamal
@ 2009-09-01 15:40 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2009-09-01 15:40 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: kvm, avi
On Tue, Sep 01, 2009 at 03:13:20PM +0200, Mohammed Gamal wrote:
> Since we return to userspace from KVM on invalid state emulation failure, let
> qemu handle it.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-01 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-01 13:13 [PATCH] Handle emulation failure in userspace Mohammed Gamal
2009-09-01 15:40 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox