Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271485
b: refs/heads/master
c: 1d2887e
h: refs/heads/master
i:
  271483: b877ad2
v: v3
  • Loading branch information
Takuya Yoshikawa authored and Avi Kivity committed Sep 25, 2011
1 parent 98524cc commit 8f9c50b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d88bb4803d62f6056b079ade6333a026fd11684
refs/heads/master: 1d2887e2d849969f58ce79203f9785ebe065d494
12 changes: 6 additions & 6 deletions trunk/arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -3373,7 +3373,7 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)
break;
#endif
default:
return -1;
return EMULATION_FAILED;
}

ctxt->op_bytes = def_op_bytes;
Expand Down Expand Up @@ -3465,7 +3465,7 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)
break;
case Prefix:
if (ctxt->rep_prefix && op_prefix)
return X86EMUL_UNHANDLEABLE;
return EMULATION_FAILED;
simd_prefix = op_prefix ? 0x66 : ctxt->rep_prefix;
switch (simd_prefix) {
case 0x00: opcode = opcode.u.gprefix->pfx_no; break;
Expand All @@ -3475,7 +3475,7 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)
}
break;
default:
return X86EMUL_UNHANDLEABLE;
return EMULATION_FAILED;
}

ctxt->d &= ~GroupMask;
Expand All @@ -3488,10 +3488,10 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)

/* Unrecognised? */
if (ctxt->d == 0 || (ctxt->d & Undefined))
return -1;
return EMULATION_FAILED;

if (!(ctxt->d & VendorSpecific) && ctxt->only_vendor_specific_insn)
return -1;
return EMULATION_FAILED;

if (mode == X86EMUL_MODE_PROT64 && (ctxt->d & Stack))
ctxt->op_bytes = 8;
Expand Down Expand Up @@ -3683,7 +3683,7 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)
if (memopp && memopp->type == OP_MEM && ctxt->rip_relative)
memopp->addr.mem.ea += ctxt->_eip;

return (rc == X86EMUL_UNHANDLEABLE) ? EMULATION_FAILED : EMULATION_OK;
return (rc != X86EMUL_CONTINUE) ? EMULATION_FAILED : EMULATION_OK;
}

static bool string_insn_completed(struct x86_emulate_ctxt *ctxt)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -4837,7 +4837,7 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,

trace_kvm_emulate_insn_start(vcpu);
++vcpu->stat.insn_emulation;
if (r) {
if (r != EMULATION_OK) {
if (emulation_type & EMULTYPE_TRAP_UD)
return EMULATE_FAIL;
if (reexecute_instruction(vcpu, cr2))
Expand Down

0 comments on commit 8f9c50b

Please sign in to comment.