aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-06-12 13:22:28 -0400
committerAvi Kivity <avi@redhat.com>2012-07-09 07:19:04 -0400
commitde5f70e0c65fcd0472a412a7a9690afcd3ee4526 (patch)
tree5b5bd6482e5731a5209b46820104021310efbb48 /arch/x86/kvm/vmx.c
parentde87dcddc70ec6a90adfcc81f0ad7d84a892ffce (diff)
KVM: VMX: Improve error reporting during invalid guest state emulation
If instruction emulation fails, report it properly to userspace. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index a62f92ab1be2..c61eb34a39e7 100644
--- 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)
4996 goto out; 4996 goto out;
4997 } 4997 }
4998 4998
4999 if (err != EMULATE_DONE) 4999 if (err != EMULATE_DONE) {
5000 vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
5001 vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_EMULATION;
5002 vcpu->run->internal.ndata = 0;
5000 return 0; 5003 return 0;
5004 }
5001 5005
5002 if (signal_pending(current)) 5006 if (signal_pending(current))
5003 goto out; 5007 goto out;