KVM: x86 emulator: Don't overwrite decode cache
authorAvi Kivity <avi@redhat.com>
Sun, 11 Apr 2010 10:05:15 +0000 (13:05 +0300)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:17:33 +0000 (12:17 +0300)
commit2fb53ad811e238d5dec8716b99986c3f234e3337
treeae8c407943348d07e980ee8e7e1f311596d7658f
parent4496f974825e2ee317c3cc94e41ec2db7eb73af8
KVM: x86 emulator: Don't overwrite decode cache

Currently if we an instruction spans a page boundary, when we fetch the
second half we overwrite the first half.  This prevents us from tracing
the full instruction opcodes.

Fix by appending the second half to the first.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/emulate.c