Skip to content

Commit

Permalink
KVM: Drop bogus x86_decode_insn() error check
Browse files Browse the repository at this point in the history
x86_decode_insn() doesn't return X86EMUL_* values, so the check
for X86EMUL_PROPOGATE_FAULT will always fail.  There is a proper
check later on, so there is no need for a replacement for this
code.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
  • Loading branch information
Avi Kivity authored and Marcelo Tosatti committed Mar 17, 2011
1 parent 0bb8865 commit 3e90943
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -4412,8 +4412,6 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,
vcpu->arch.emulate_ctxt.perm_ok = false;

r = x86_decode_insn(&vcpu->arch.emulate_ctxt, insn, insn_len);
if (r == X86EMUL_PROPAGATE_FAULT)
goto done;

trace_kvm_emulate_insn_start(vcpu);

Expand Down Expand Up @@ -4473,7 +4471,6 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,
return handle_emulation_failure(vcpu);
}

done:
if (vcpu->arch.emulate_ctxt.have_exception) {
inject_emulated_exception(vcpu);
r = EMULATE_DONE;
Expand Down

0 comments on commit 3e90943

Please sign in to comment.