summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2008-11-29 20:36:13 +0200
committerAvi Kivity <avi@redhat.com>2008-11-29 20:36:13 +0200
commitec79c05725e10cda04018d4b14fad8869c206898 (patch)
treeff0e5080b87ca4c879fef522cde442f40873a693 /arch/x86
parentaaad5c21ade48955202b22bce1152a8188b3e48e (diff)
KVM: x86 emulator: fix popf emulation
Set operand type and size to get correct writeback behavior. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/x86_emulate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 72ae86b1b131..e8c87ccfe310 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -1552,7 +1552,9 @@ special_insn:
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];