aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2008-11-28 00:14:07 +0200
committerAvi Kivity <avi@redhat.com>2008-12-31 16:55:05 +0200
commitcf5de4f886116871c2ae2eee53524edd741a68ae (patch)
treed9d4626a7a46086784ef1fad2c0960f00a353e59 /arch
parent8a09b6877f3100207b3572e7e12ea796493fe914 (diff)
KVM: x86 emulator: fix ret emulation
'ret' did not set the operand type or size for the destination, so writeback ignored it. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-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 702de9869c1..72ae86b1b13 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -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: