diff options
author | Avi Kivity <avi@redhat.com> | 2011-02-01 09:32:02 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2011-03-17 12:08:28 -0400 |
commit | 3e90943907ff84cf0379a57c01c296a9b33c903e (patch) | |
tree | a09df0ce177e23905773fe2b19c49d0b229c25b0 | |
parent | 0bb8865979629a9dfc6761f8f4d47926d539daa0 (diff) |
KVM: Drop bogus x86_decode_insn() error check
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>
-rw-r--r-- | arch/x86/kvm/x86.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 712af904706f..dd8016d2efa9 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -4412,8 +4412,6 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, | |||
4412 | vcpu->arch.emulate_ctxt.perm_ok = false; | 4412 | vcpu->arch.emulate_ctxt.perm_ok = false; |
4413 | 4413 | ||
4414 | r = x86_decode_insn(&vcpu->arch.emulate_ctxt, insn, insn_len); | 4414 | r = x86_decode_insn(&vcpu->arch.emulate_ctxt, insn, insn_len); |
4415 | if (r == X86EMUL_PROPAGATE_FAULT) | ||
4416 | goto done; | ||
4417 | 4415 | ||
4418 | trace_kvm_emulate_insn_start(vcpu); | 4416 | trace_kvm_emulate_insn_start(vcpu); |
4419 | 4417 | ||
@@ -4473,7 +4471,6 @@ restart: | |||
4473 | return handle_emulation_failure(vcpu); | 4471 | return handle_emulation_failure(vcpu); |
4474 | } | 4472 | } |
4475 | 4473 | ||
4476 | done: | ||
4477 | if (vcpu->arch.emulate_ctxt.have_exception) { | 4474 | if (vcpu->arch.emulate_ctxt.have_exception) { |
4478 | inject_emulated_exception(vcpu); | 4475 | inject_emulated_exception(vcpu); |
4479 | r = EMULATE_DONE; | 4476 | r = EMULATE_DONE; |