Hi Avi, The patch to implement "jmp rel" emulation is attached.
Thanks & Regards, Nitin Open Source Technology Center, Intel Corporation. ------------------------------------------------------------------------- The mind is like a parachute; it works much better when it's open.
commit 1d77b7ad2bcb20858dd66d9653952a8d1cc0a153 Author: Nitin A Kamble <[EMAIL PROTECTED]> Date: Fri Aug 10 18:36:12 2007 -0700 Implement instruction "jmp rel" opcode 0xe9 Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index b4f439c..40fb6ee 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c @@ -145,8 +145,10 @@ static u8 opcode_table[256] = { 0, 0, 0, 0, /* 0xD8 - 0xDF */ 0, 0, 0, 0, 0, 0, 0, 0, - /* 0xE0 - 0xEF */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0xE0 - 0xE7 */ + 0, 0, 0, 0, 0, 0, 0, 0, + /* 0xE8 - 0xEF */ + 0, SrcImm|ImplicitOps, 0, 0, 0, 0, 0, 0, /* 0xF0 - 0xF7 */ 0, 0, 0, 0, ImplicitOps, 0, @@ -447,6 +449,12 @@ struct operand { (((reg) + _inc) & ((1UL << (ad_bytes << 3)) - 1)); \ } while (0) +#define jmp_rel(rel) \ +do { \ + _eip += (int)(rel); \ + _eip = ((op_bytes == 2) ? (uint16_t)_eip : (uint32_t)_eip); \ +} while (0) + /* * Given the 'reg' portion of a ModRM byte, and a register block, return a * pointer into the block that addresses the relevant register. @@ -1200,6 +1208,10 @@ special_insn: case 0xae ... 0xaf: /* scas */ DPRINTF("Urk! I don't handle SCAS.\n"); goto cannot_emulate; + case 0xe9: /* jmp rel */ + jmp_rel(src.val); + no_wb = 1; /* Disable writeback. */ + break; case 0xf4: /* hlt */ ctxt->vcpu->halt_request = 1; goto done;
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel