]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: x86 emulator: fix byte-sized MOVZX/MOVSX
authorAvi Kivity <avi@redhat.com>
Wed, 15 Aug 2012 08:49:04 +0000 (11:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Aug 2012 02:31:45 +0000 (19:31 -0700)
commit7b2aa2a522ffcc5dee38d3706149d1b46ec55da7
tree49769921179b59982c4ebcf908fe99c739acb0e2
parentad2aeb6108ad34940dcb788bd39c3bb16348e88c
KVM: x86 emulator: fix byte-sized MOVZX/MOVSX

(cherry picked from commit 361cad2b50a2c92b91b6f568db860fabad3bf149)

Commit 2adb5ad9fe1 removed ByteOp from MOVZX/MOVSX, replacing them by
SrcMem8, but neglected to fix the dependency in the emulation code
on ByteOp.  This caused the instruction not to have any effect in
some circumstances.

Fix by replacing the check for ByteOp with the equivalent src.op_bytes == 1.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/emulate.c