Skip to content

Commit

Permalink
KVM: x86 emulator: fix popf emulation
Browse files Browse the repository at this point in the history
Set operand type and size to get correct writeback behavior.

Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Avi Kivity committed Dec 31, 2008
1 parent cf5de4f commit 2b48cc7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kvm/x86_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,9 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
emulate_push(ctxt);
break;
case 0x9d: /* popf */
c->dst.type = OP_REG;
c->dst.ptr = (unsigned long *) &ctxt->eflags;
c->dst.bytes = c->op_bytes;
goto pop_instruction;
case 0xa0 ... 0xa1: /* mov */
c->dst.ptr = (unsigned long *)&c->regs[VCPU_REGS_RAX];
Expand Down

0 comments on commit 2b48cc7

Please sign in to comment.