Skip to content

Commit 26a3e98

Browse files
Nitin A Kambleavikivity
authored andcommitted
KVM: x86 emulator: jmp abs
Implement emulation of instruction: jump absolute r/m opcode: 0xff /4 Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
1 parent 7e0b54b commit 26a3e98

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/kvm/x86_emulate.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,12 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
11481148
case 1: /* dec */
11491149
emulate_1op("dec", dst, _eflags);
11501150
break;
1151+
case 4: /* jmp abs */
1152+
if (b == 0xff)
1153+
_eip = dst.val;
1154+
else
1155+
goto cannot_emulate;
1156+
break;
11511157
case 6: /* push */
11521158
/* 64-bit mode: PUSH always pushes a 64-bit operand. */
11531159
if (mode == X86EMUL_MODE_PROT64) {

0 commit comments

Comments
 (0)