Browse Source

KVM: x86 emulator: implement 'push imm' (opcode 0x68)

Encountered in FC6 boot sequence, now that we don't force ss.rpl = 0 during
the protected mode transition.  Not really necessary, but nice to have.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Avi Kivity 17 years ago
parent
commit
91ed7a0e15
1 changed files with 2 additions and 1 deletions
  1. 2 1
      arch/x86/kvm/x86_emulate.c

+ 2 - 1
arch/x86/kvm/x86_emulate.c

@@ -121,7 +121,7 @@ static u16 opcode_table[256] = {
 	0, 0, 0, DstReg | SrcMem32 | ModRM | Mov /* movsxd (x86/64) */ ,
 	0, 0, 0, DstReg | SrcMem32 | ModRM | Mov /* movsxd (x86/64) */ ,
 	0, 0, 0, 0,
 	0, 0, 0, 0,
 	/* 0x68 - 0x6F */
 	/* 0x68 - 0x6F */
-	0, 0, SrcImmByte | Mov | Stack, 0,
+	SrcImm | Mov | Stack, 0, SrcImmByte | Mov | Stack, 0,
 	SrcNone  | ByteOp  | ImplicitOps, SrcNone  | ImplicitOps, /* insb, insw/insd */
 	SrcNone  | ByteOp  | ImplicitOps, SrcNone  | ImplicitOps, /* insb, insw/insd */
 	SrcNone  | ByteOp  | ImplicitOps, SrcNone  | ImplicitOps, /* outsb, outsw/outsd */
 	SrcNone  | ByteOp  | ImplicitOps, SrcNone  | ImplicitOps, /* outsb, outsw/outsd */
 	/* 0x70 - 0x77 */
 	/* 0x70 - 0x77 */
@@ -1424,6 +1424,7 @@ special_insn:
 			goto cannot_emulate;
 			goto cannot_emulate;
 		c->dst.val = (s32) c->src.val;
 		c->dst.val = (s32) c->src.val;
 		break;
 		break;
+	case 0x68: /* push imm */
 	case 0x6a: /* push imm8 */
 	case 0x6a: /* push imm8 */
 		emulate_push(ctxt);
 		emulate_push(ctxt);
 		break;
 		break;