aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2008-01-18 05:46:50 -0500
committerAvi Kivity <avi@qumranet.com>2008-04-27 04:53:14 -0400
commit43bb19cd3398d3f544d8e2d6ed6c5c5d7b4e5819 (patch)
treea5a868abf0ce93aeb7e5916c60f5d3775ab061ee
parente09d082c03e137015bc0a17ca77e4b9dca08a5d7 (diff)
KVM: x86 emulator: group decoding for group 1A
This adds group decode support for opcode 0x8f. Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--arch/x86/kvm/x86_emulate.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 46ecf349a116..cf1ce7c316a9 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -69,6 +69,10 @@
69#define GroupDual (1<<15) /* Alternate decoding of mod == 3 */ 69#define GroupDual (1<<15) /* Alternate decoding of mod == 3 */
70#define GroupMask 0xff /* Group number stored in bits 0:7 */ 70#define GroupMask 0xff /* Group number stored in bits 0:7 */
71 71
72enum {
73 Group1A,
74};
75
72static u16 opcode_table[256] = { 76static u16 opcode_table[256] = {
73 /* 0x00 - 0x07 */ 77 /* 0x00 - 0x07 */
74 ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM, 78 ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM,
@@ -133,7 +137,7 @@ static u16 opcode_table[256] = {
133 /* 0x88 - 0x8F */ 137 /* 0x88 - 0x8F */
134 ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov, 138 ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov,
135 ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov, 139 ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
136 0, ModRM | DstReg, 0, DstMem | SrcNone | ModRM | Mov | Stack, 140 0, ModRM | DstReg, 0, Group | Group1A,
137 /* 0x90 - 0x9F */ 141 /* 0x90 - 0x9F */
138 0, 0, 0, 0, 0, 0, 0, 0, 142 0, 0, 0, 0, 0, 0, 0, 0,
139 0, 0, 0, 0, ImplicitOps | Stack, ImplicitOps | Stack, 0, 0, 143 0, 0, 0, 0, ImplicitOps | Stack, ImplicitOps | Stack, 0, 0,
@@ -233,6 +237,8 @@ static u16 twobyte_table[256] = {
233}; 237};
234 238
235static u16 group_table[] = { 239static u16 group_table[] = {
240 [Group1A*8] =
241 DstMem | SrcNone | ModRM | Mov | Stack, 0, 0, 0, 0, 0, 0, 0,
236}; 242};
237 243
238static u16 group2_table[] = { 244static u16 group2_table[] = {