Skip to content

Commit

Permalink
KVM: x86 emulator: fix ret emulation
Browse files Browse the repository at this point in the history
'ret' did not set the operand type or size for the destination, so
writeback ignored it.

Signed-off-by: Avi Kivity <[email protected]>
  • Loading branch information
avikivity committed Dec 31, 2008
1 parent 8a09b68 commit cf5de4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kvm/x86_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,9 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
emulate_grp2(ctxt);
break;
case 0xc3: /* ret */
c->dst.type = OP_REG;
c->dst.ptr = &c->eip;
c->dst.bytes = c->op_bytes;
goto pop_instruction;
case 0xc6 ... 0xc7: /* mov (sole member of Grp11) */
mov:
Expand Down

0 comments on commit cf5de4f

Please sign in to comment.