aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-02-10 07:21:29 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 10:36:10 -0500
commit2db2c2eb6226e30f8059b82512a1364db98da8e3 (patch)
tree21c7fe4ebd74c0f969ce6d67ff5c4b803ca46071 /arch/x86
parent8b97fb0fcba0e119d539ef6126ddd1d7ba9c007f (diff)
KVM: x86 emulator: Add group8 instruction decoding
Use groups mechanism to decode 0F BA 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')
-rw-r--r--arch/x86/kvm/emulate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 645b245a3c23..435b1e4e8c9b 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -88,6 +88,7 @@
88enum { 88enum {
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}; 92};
92 93
93static u32 opcode_table[256] = { 94static u32 opcode_table[256] = {
@@ -267,7 +268,7 @@ static u32 twobyte_table[256] = {
267 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, 268 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov,
268 DstReg | SrcMem16 | ModRM | Mov, 269 DstReg | SrcMem16 | ModRM | Mov,
269 /* 0xB8 - 0xBF */ 270 /* 0xB8 - 0xBF */
270 0, 0, DstMem | SrcImmByte | ModRM, DstMem | SrcReg | ModRM | BitOp, 271 0, 0, Group | Group8, DstMem | SrcReg | ModRM | BitOp,
271 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, 272 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov,
272 DstReg | SrcMem16 | ModRM | Mov, 273 DstReg | SrcMem16 | ModRM | Mov,
273 /* 0xC0 - 0xCF */ 274 /* 0xC0 - 0xCF */
@@ -323,6 +324,10 @@ static u32 group_table[] = {
323 0, 0, ModRM | SrcMem, ModRM | SrcMem, 324 0, 0, ModRM | SrcMem, ModRM | SrcMem,
324 SrcNone | ModRM | DstMem | Mov, 0, 325 SrcNone | ModRM | DstMem | Mov, 0,
325 SrcMem16 | ModRM | Mov, SrcMem | ModRM | ByteOp, 326 SrcMem16 | ModRM | Mov, SrcMem | ModRM | ByteOp,
327 [Group8*8] =
328 0, 0, 0, 0,
329 DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM,
330 DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM,
326}; 331};
327 332
328static u32 group2_table[] = { 333static u32 group2_table[] = {