aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2008-01-18 06:36:50 -0500
committerAvi Kivity <avi@qumranet.com>2008-04-27 04:53:15 -0400
commitd95058a1a7170ae2af2939cbdab0ff5d5e005238 (patch)
treec50fa7fbb4fce139c8921d085209ead86338eaaf
parentfd60754e4ffa992586346dd56451723b4c096626 (diff)
KVM: x86 emulator: add group 7 decoding
This adds group decoding for opcode 0x0f 0x01 (group 7). Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--arch/x86/kvm/x86_emulate.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 7310368c4857..ef6de16bb597 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -70,7 +70,7 @@
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 { 72enum {
73 Group1A, Group3_Byte, Group3, Group4, Group5, 73 Group1A, Group3_Byte, Group3, Group4, Group5, Group7,
74}; 74};
75 75
76static u16 opcode_table[256] = { 76static u16 opcode_table[256] = {
@@ -179,7 +179,7 @@ static u16 opcode_table[256] = {
179 179
180static u16 twobyte_table[256] = { 180static u16 twobyte_table[256] = {
181 /* 0x00 - 0x0F */ 181 /* 0x00 - 0x0F */
182 0, SrcMem | ModRM | DstReg, 0, 0, 0, 0, ImplicitOps, 0, 182 0, Group | GroupDual | Group7, 0, 0, 0, 0, ImplicitOps, 0,
183 ImplicitOps, ImplicitOps, 0, 0, 0, ImplicitOps | ModRM, 0, 0, 183 ImplicitOps, ImplicitOps, 0, 0, 0, ImplicitOps | ModRM, 0, 0,
184 /* 0x10 - 0x1F */ 184 /* 0x10 - 0x1F */
185 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, 0, 0, 0, 0, 0, 185 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, 0, 0, 0, 0, 0,
@@ -252,9 +252,14 @@ static u16 group_table[] = {
252 [Group5*8] = 252 [Group5*8] =
253 DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM, 0, 0, 253 DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM, 0, 0,
254 SrcMem | ModRM, 0, SrcMem | ModRM | Stack, 0, 254 SrcMem | ModRM, 0, SrcMem | ModRM | Stack, 0,
255 [Group7*8] =
256 0, 0, ModRM | SrcMem, ModRM | SrcMem,
257 SrcNone | ModRM | DstMem, 0, SrcMem | ModRM, SrcMem | ModRM | ByteOp,
255}; 258};
256 259
257static u16 group2_table[] = { 260static u16 group2_table[] = {
261 [Group7*8] =
262 SrcNone | ModRM, 0, 0, 0, SrcNone | ModRM | DstMem, 0, SrcMem | ModRM, 0,
258}; 263};
259 264
260/* EFLAGS bit definitions. */ 265/* EFLAGS bit definitions. */