summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNadav Amit <namit@cs.technion.ac.il>2014-12-25 01:52:20 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2015-01-08 22:48:06 +0100
commit80976dbb5cb2b64480d7d38981b3220887575728 (patch)
tree278131773741b6a5ef05aa5ec4fb2077622d9728
parentKVM: x86: JMP/CALL using call- or task-gate causes exception (diff)
downloadlinux-80976dbb5cb2b64480d7d38981b3220887575728.tar.xz
linux-80976dbb5cb2b64480d7d38981b3220887575728.zip
KVM: x86: em_call_far should return failure result
Currently, if em_call_far fails it returns success instead of the resulting error-code. Fix it. Signed-off-by: Nadav Amit <namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 1fec3ed86cbf..8f32c03515ad 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3027,7 +3027,7 @@ static int em_call_far(struct x86_emulate_ctxt *ctxt)
rc = __load_segment_descriptor(ctxt, sel, VCPU_SREG_CS, cpl,
X86_TRANSFER_CALL_JMP, &new_desc);
if (rc != X86EMUL_CONTINUE)
- return X86EMUL_CONTINUE;
+ return rc;
rc = assign_eip_far(ctxt, ctxt->src.val, &new_desc);
if (rc != X86EMUL_CONTINUE)