Implement "ret" instruction in x86_emulate
PATCH 1/1 Implement "ret" instruction in x86_emulate
Hi Avi,
Please find a patch implementing the "ret" instruction in thex86_emulation.
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation.
-------------------------------------------------------------------------
The mind is like a parachute; it works much better when it's open.
commit 32271188f940f8f30f9be0c4860077381d6b524c
Author: Nitin A Kamble <[email protected]> Date: Thu Jun 7 18:32:45 2007 -0700
Implement "ret" instruction, opcode 0xc3
drivers/kvm/x86_emulate.c +7 -2
@@ -129,7 +129,7 @@ static u8 opcode_table[256] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 0xC0 - 0xC7 */ ByteOp | DstMem | SrcImm | ModRM, DstMem | SrcImmByte | ModRM,0 ,0 , -0 ,0 , ByteOp | DstMem | SrcImm | ModRM | Mov, + ImplicitOps,0 , ByteOp | DstMem | SrcImm | ModRM | Mov, DstMem | SrcImm | ModRM | Mov,/* 0xC8 - 0xCF */ 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1113,10 +1113,15 @@ special_insn: _eip = ctxt->vcpu->rip; } switch (b) { + case 0xc3: /* ret */ + dst.ptr = & _eip; + goto pop_instruction; case 0x58 ... 0x5f: /* pop reg */ + dst.ptr = (unsigned long *)&_regs[b & 0x7]; + + pop_instruction: dst.type = OP_REG; dst.bytes = op_bytes; - dst.ptr = (unsigned long *)&_regs[b & 0x7]; if ((rc = ops->read_std(register_address(ctxt->ss_base, _regs[VCPU_REGS_RSP]),
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel