]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: x86 emulator: fix ret emulation
authorAvi Kivity <avi@redhat.com>
Thu, 27 Nov 2008 22:14:07 +0000 (00:14 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 31 Dec 2008 14:55:05 +0000 (16:55 +0200)
'ret' did not set the operand type or size for the destination, so
writeback ignored it.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86_emulate.c

index 702de9869c193f6c2d576565e55d9804673b799b..72ae86b1b131e9d11168f024afa0c231c4dea2f2 100644 (file)
@@ -1650,7 +1650,9 @@ special_insn:
                emulate_grp2(ctxt);
                break;
        case 0xc3: /* ret */
+               c->dst.type = OP_REG;
                c->dst.ptr = &c->eip;
+               c->dst.bytes = c->op_bytes;
                goto pop_instruction;
        case 0xc6 ... 0xc7:     /* mov (sole member of Grp11) */
        mov: