aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86_emulate.c
diff options
context:
space:
mode:
authorMohammed Gamal <m.gamal005@gmail.com>2008-09-08 14:47:19 -0400
committerAvi Kivity <avi@qumranet.com>2008-10-15 04:15:26 -0400
commitd19292e457a7c1b7f6c12bccbfdfd53630de1cee (patch)
treeb809cc8dfaa7c51f361a3a007ae4744d17de210f /arch/x86/kvm/x86_emulate.c
parentd76901750ab9f71091d33ef3d2b5909d8a9a4ad4 (diff)
KVM: x86 emulator: Add call near absolute instruction (opcode 0xff/2)
Add call near absolute instruction. Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/x86_emulate.c')
-rw-r--r--arch/x86/kvm/x86_emulate.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 3ac2f1485223..0630d2198763 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -286,7 +286,8 @@ static u16 group_table[] = {
286 ByteOp | DstMem | SrcNone | ModRM, ByteOp | DstMem | SrcNone | ModRM, 286 ByteOp | DstMem | SrcNone | ModRM, ByteOp | DstMem | SrcNone | ModRM,
287 0, 0, 0, 0, 0, 0, 287 0, 0, 0, 0, 0, 0,
288 [Group5*8] = 288 [Group5*8] =
289 DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM, 0, 0, 289 DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM,
290 SrcMem | ModRM | Stack, 0,
290 SrcMem | ModRM, 0, SrcMem | ModRM | Stack, 0, 291 SrcMem | ModRM, 0, SrcMem | ModRM | Stack, 0,
291 [Group7*8] = 292 [Group7*8] =
292 0, 0, ModRM | SrcMem, ModRM | SrcMem, 293 0, 0, ModRM | SrcMem, ModRM | SrcMem,
@@ -1162,6 +1163,14 @@ static inline int emulate_grp45(struct x86_emulate_ctxt *ctxt,
1162 case 1: /* dec */ 1163 case 1: /* dec */
1163 emulate_1op("dec", c->dst, ctxt->eflags); 1164 emulate_1op("dec", c->dst, ctxt->eflags);
1164 break; 1165 break;
1166 case 2: /* call near abs */ {
1167 long int old_eip;
1168 old_eip = c->eip;
1169 c->eip = c->src.val;
1170 c->src.val = old_eip;
1171 emulate_push(ctxt);
1172 break;
1173 }
1165 case 4: /* jmp abs */ 1174 case 4: /* jmp abs */
1166 c->eip = c->src.val; 1175 c->eip = c->src.val;
1167 break; 1176 break;