KVM: x86 emulator: fix 'mov sreg,rm16' instruction decoding
authorWei Yongjun <yjwei@cn.fujitsu.com>
Tue, 6 Jul 2010 08:49:05 +0000 (16:49 +0800)
committerAvi Kivity <avi@redhat.com>
Mon, 2 Aug 2010 03:40:22 +0000 (06:40 +0300)
Memory reads for 'mov sreg,rm16' should be 16 bits only.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/emulate.c

index e8bdddc4509e6bd23c6543108c1ead4136f65e0e..d842a7d2bc64b22c0ed1e36d3076adf71421e13a 100644 (file)
@@ -170,7 +170,7 @@ static u32 opcode_table[256] = {
        ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov,
        ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
        DstMem | SrcReg | ModRM | Mov, ModRM | DstReg,
-       ImplicitOps | SrcMem | ModRM, Group | Group1A,
+       ImplicitOps | SrcMem16 | ModRM, Group | Group1A,
        /* 0x90 - 0x97 */
        DstReg, DstReg, DstReg, DstReg, DstReg, DstReg, DstReg, DstReg,
        /* 0x98 - 0x9F */