projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de87dcd
)
KVM: VMX: Improve error reporting during invalid guest state emulation
author
Avi Kivity
<avi@redhat.com>
Tue, 12 Jun 2012 17:22:28 +0000
(20:22 +0300)
committer
Avi Kivity
<avi@redhat.com>
Mon, 9 Jul 2012 11:19:04 +0000
(14:19 +0300)
If instruction emulation fails, report it properly to userspace.
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/vmx.c
b/arch/x86/kvm/vmx.c
index
a62f92a
..
c61eb34
100644
(file)
--- a/
arch/x86/kvm/vmx.c
+++ b/
arch/x86/kvm/vmx.c
@@
-4996,8
+4996,12
@@
static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)
goto out;
}
- if (err != EMULATE_DONE)
+ if (err != EMULATE_DONE) {
+ vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
+ vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_EMULATION;
+ vcpu->run->internal.ndata = 0;
return 0;
+ }
if (signal_pending(current))
goto out;