diff options
author | Avi Kivity <avi@redhat.com> | 2008-11-29 13:36:13 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:55:05 -0500 |
commit | 2b48cc75b21431037d6f902b9d583b1aff198490 (patch) | |
tree | 94701bb39071951a8683a0f462d59a75e343caf5 /arch/x86/kvm/x86_emulate.c | |
parent | cf5de4f886116871c2ae2eee53524edd741a68ae (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/kvm/x86_emulate.c')
-rw-r--r-- | arch/x86/kvm/x86_emulate.c | 2 |
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: | |||
1552 | emulate_push(ctxt); | 1552 | emulate_push(ctxt); |
1553 | break; | 1553 | break; |
1554 | case 0x9d: /* popf */ | 1554 | case 0x9d: /* popf */ |
1555 | c->dst.type = OP_REG; | ||
1555 | c->dst.ptr = (unsigned long *) &ctxt->eflags; | 1556 | c->dst.ptr = (unsigned long *) &ctxt->eflags; |
1557 | c->dst.bytes = c->op_bytes; | ||
1556 | goto pop_instruction; | 1558 | goto pop_instruction; |
1557 | case 0xa0 ... 0xa1: /* mov */ | 1559 | case 0xa0 ... 0xa1: /* mov */ |
1558 | c->dst.ptr = (unsigned long *)&c->regs[VCPU_REGS_RAX]; | 1560 | c->dst.ptr = (unsigned long *)&c->regs[VCPU_REGS_RAX]; |