Commit 2b48cc75 authored by Avi Kivity's avatar Avi Kivity

KVM: x86 emulator: fix popf emulation

Set operand type and size to get correct writeback behavior.
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent cf5de4f8
...@@ -1552,7 +1552,9 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) ...@@ -1552,7 +1552,9 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
emulate_push(ctxt); emulate_push(ctxt);
break; break;
case 0x9d: /* popf */ case 0x9d: /* popf */
c->dst.type = OP_REG;
c->dst.ptr = (unsigned long *) &ctxt->eflags; c->dst.ptr = (unsigned long *) &ctxt->eflags;
c->dst.bytes = c->op_bytes;
goto pop_instruction; goto pop_instruction;
case 0xa0 ... 0xa1: /* mov */ case 0xa0 ... 0xa1: /* mov */
c->dst.ptr = (unsigned long *)&c->regs[VCPU_REGS_RAX]; c->dst.ptr = (unsigned long *)&c->regs[VCPU_REGS_RAX];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment