diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-02-10 07:21:30 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:36:10 -0500 |
commit | 60a29d4ea4e7b6b95d9391ebc8625b0426f3a363 (patch) | |
tree | 58e73c5366d0017a83cb6f632be5c53ff93b67f6 /arch/x86/kvm/emulate.c | |
parent | 2db2c2eb6226e30f8059b82512a1364db98da8e3 (diff) |
KVM: x86 emulator: Add group9 instruction decoding
Use groups mechanism to decode 0F C7 instructions.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 435b1e4e8c9b..45a4f7c1bb0b 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -88,7 +88,7 @@ | |||
88 | enum { | 88 | enum { |
89 | Group1_80, Group1_81, Group1_82, Group1_83, | 89 | Group1_80, Group1_81, Group1_82, Group1_83, |
90 | Group1A, Group3_Byte, Group3, Group4, Group5, Group7, | 90 | Group1A, Group3_Byte, Group3, Group4, Group5, Group7, |
91 | Group8, | 91 | Group8, Group9, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static u32 opcode_table[256] = { | 94 | static u32 opcode_table[256] = { |
@@ -272,7 +272,8 @@ static u32 twobyte_table[256] = { | |||
272 | 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, | 272 | 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, |
273 | DstReg | SrcMem16 | ModRM | Mov, | 273 | DstReg | SrcMem16 | ModRM | Mov, |
274 | /* 0xC0 - 0xCF */ | 274 | /* 0xC0 - 0xCF */ |
275 | 0, 0, 0, DstMem | SrcReg | ModRM | Mov, 0, 0, 0, ImplicitOps | ModRM, | 275 | 0, 0, 0, DstMem | SrcReg | ModRM | Mov, |
276 | 0, 0, 0, Group | GroupDual | Group9, | ||
276 | 0, 0, 0, 0, 0, 0, 0, 0, | 277 | 0, 0, 0, 0, 0, 0, 0, 0, |
277 | /* 0xD0 - 0xDF */ | 278 | /* 0xD0 - 0xDF */ |
278 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 279 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
@@ -328,6 +329,8 @@ static u32 group_table[] = { | |||
328 | 0, 0, 0, 0, | 329 | 0, 0, 0, 0, |
329 | DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM, | 330 | DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM, |
330 | DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM, | 331 | DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM, |
332 | [Group9*8] = | ||
333 | 0, ImplicitOps | ModRM, 0, 0, 0, 0, 0, 0, | ||
331 | }; | 334 | }; |
332 | 335 | ||
333 | static u32 group2_table[] = { | 336 | static u32 group2_table[] = { |
@@ -335,6 +338,8 @@ static u32 group2_table[] = { | |||
335 | SrcNone | ModRM, 0, 0, SrcNone | ModRM, | 338 | SrcNone | ModRM, 0, 0, SrcNone | ModRM, |
336 | SrcNone | ModRM | DstMem | Mov, 0, | 339 | SrcNone | ModRM | DstMem | Mov, 0, |
337 | SrcMem16 | ModRM | Mov, 0, | 340 | SrcMem16 | ModRM | Mov, 0, |
341 | [Group9*8] = | ||
342 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
338 | }; | 343 | }; |
339 | 344 | ||
340 | /* EFLAGS bit definitions. */ | 345 | /* EFLAGS bit definitions. */ |