Commit 2db2c2eb authored by Gleb Natapov's avatar Gleb Natapov Committed by Marcelo Tosatti

KVM: x86 emulator: Add group8 instruction decoding

Use groups mechanism to decode 0F BA instructions.
Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
Cc: stable@kernel.org
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 8b97fb0f
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
enum { enum {
Group1_80, Group1_81, Group1_82, Group1_83, Group1_80, Group1_81, Group1_82, Group1_83,
Group1A, Group3_Byte, Group3, Group4, Group5, Group7, Group1A, Group3_Byte, Group3, Group4, Group5, Group7,
Group8,
}; };
static u32 opcode_table[256] = { static u32 opcode_table[256] = {
...@@ -267,7 +268,7 @@ static u32 twobyte_table[256] = { ...@@ -267,7 +268,7 @@ static u32 twobyte_table[256] = {
0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov,
DstReg | SrcMem16 | ModRM | Mov, DstReg | SrcMem16 | ModRM | Mov,
/* 0xB8 - 0xBF */ /* 0xB8 - 0xBF */
0, 0, DstMem | SrcImmByte | ModRM, DstMem | SrcReg | ModRM | BitOp, 0, 0, Group | Group8, DstMem | SrcReg | ModRM | BitOp,
0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov,
DstReg | SrcMem16 | ModRM | Mov, DstReg | SrcMem16 | ModRM | Mov,
/* 0xC0 - 0xCF */ /* 0xC0 - 0xCF */
...@@ -323,6 +324,10 @@ static u32 group_table[] = { ...@@ -323,6 +324,10 @@ static u32 group_table[] = {
0, 0, ModRM | SrcMem, ModRM | SrcMem, 0, 0, ModRM | SrcMem, ModRM | SrcMem,
SrcNone | ModRM | DstMem | Mov, 0, SrcNone | ModRM | DstMem | Mov, 0,
SrcMem16 | ModRM | Mov, SrcMem | ModRM | ByteOp, SrcMem16 | ModRM | Mov, SrcMem | ModRM | ByteOp,
[Group8*8] =
0, 0, 0, 0,
DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM,
DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM,
}; };
static u32 group2_table[] = { static u32 group2_table[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment