Skip to content

Commit 535eabc

Browse files
Nitin A Kambleavikivity
authored andcommitted
KVM: x86 emulator: popf
Implement emulation of instruction: popf opcode: 0x9d Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
1 parent 12fa272 commit 535eabc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/kvm/x86_emulate.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static u8 opcode_table[256] = {
127127
ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
128128
0, ModRM | DstReg, 0, DstMem | SrcNone | ModRM | Mov,
129129
/* 0x90 - 0x9F */
130-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, 0, 0, 0,
130+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, ImplicitOps, 0, 0,
131131
/* 0xA0 - 0xA7 */
132132
ByteOp | DstReg | SrcMem | Mov, DstReg | SrcMem | Mov,
133133
ByteOp | DstMem | SrcReg | Mov, DstMem | SrcReg | Mov,
@@ -1293,6 +1293,9 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
12931293
case 0x9c: /* pushf */
12941294
src.val = (unsigned long) _eflags;
12951295
goto push;
1296+
case 0x9d: /* popf */
1297+
dst.ptr = (unsigned long *) &_eflags;
1298+
goto pop_instruction;
12961299
case 0xc3: /* ret */
12971300
dst.ptr = &_eip;
12981301
goto pop_instruction;

0 commit comments

Comments
 (0)