From: Avi Kivity Date: Sat, 29 Nov 2008 18:36:13 +0000 (+0200) Subject: KVM: x86 emulator: fix popf emulation X-Git-Tag: v2.6.29-rc1~539^2~42 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=2b48cc75b21431037d6f902b9d583b1aff198490;p=~shefty%2Frdma-dev.git KVM: x86 emulator: fix popf emulation Set operand type and size to get correct writeback behavior. Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 72ae86b1b13..e8c87ccfe31 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];