Re: [ 43/46] KVM: x86 emulator: fix byte-sized MOVZX/MOVSX

From: Ben Hutchings
Date: Wed Aug 22 2012 - 20:04:42 EST


On Sun, 2012-08-19 at 20:59 -0700, Greg Kroah-Hartman wrote:
> From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
>
> 3.5-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Avi Kivity <avi@xxxxxxxxxx>
>
> (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.
[...]

Also needed for 3.4, based on the commit that's blamed.

Ben.

--
Ben Hutchings
Experience is what causes a person to make new mistakes instead of old ones.

Attachment: signature.asc
Description: This is a digitally signed message part