[PATCH 04/40] KVM: x86 emulator: group decoding for group 1A
- From: Avi Kivity <avi@xxxxxxxxxxxx>
- Date: Mon, 31 Mar 2008 17:36:48 +0300
This adds group decode support for opcode 0x8f.
Signed-off-by: Avi Kivity <avi@xxxxxxxxxxxx>
---
arch/x86/kvm/x86_emulate.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 46ecf34..cf1ce7c 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -69,6 +69,10 @@
#define GroupDual (1<<15) /* Alternate decoding of mod == 3 */
#define GroupMask 0xff /* Group number stored in bits 0:7 */
+enum {
+ Group1A,
+};
+
static u16 opcode_table[256] = {
/* 0x00 - 0x07 */
ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM,
@@ -133,7 +137,7 @@ static u16 opcode_table[256] = {
/* 0x88 - 0x8F */
ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov,
ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
- 0, ModRM | DstReg, 0, DstMem | SrcNone | ModRM | Mov | Stack,
+ 0, ModRM | DstReg, 0, Group | Group1A,
/* 0x90 - 0x9F */
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, ImplicitOps | Stack, ImplicitOps | Stack, 0, 0,
@@ -233,6 +237,8 @@ static u16 twobyte_table[256] = {
};
static u16 group_table[] = {
+ [Group1A*8] =
+ DstMem | SrcNone | ModRM | Mov | Stack, 0, 0, 0, 0, 0, 0, 0,
};
static u16 group2_table[] = {
--
1.5.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH 00/40] KVM updates for the 2.6.26 merge window (part I)
- From: Avi Kivity
- [PATCH 00/40] KVM updates for the 2.6.26 merge window (part I)
- Prev by Date: Re: [Pull] Some documentation patches
- Next by Date: [PATCH 00/40] KVM updates for the 2.6.26 merge window (part I)
- Previous by thread: [PATCH 00/40] KVM updates for the 2.6.26 merge window (part I)
- Next by thread: [PATCH 03/40] KVM: x86 emulator: add support for group decoding
- Index(es):
Relevant Pages
- [PATCH] x86: Unify kpropes MAX_INSN_SIZE definition
... kprobe_opcode_t opcode; ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - Re: LD BC, nn
... >After reading the FAQ I came up with this: ... every instruction not part
of the opcode fetch. ... Use autogenerated code. ... Use a test suite
to test your opcodes. ... (comp.sys.sinclair) - Re: [GIT PULL] MMC updates
... What are opcode defines doing in the driver? ... -- Pierre Ossman
... More majordomo info at http://vger.kernel.org/majordomo-info.html ... (Linux-Kernel) - [PATCH 42/50] KVM: x86 emulator: Implement emulation of instruction: inc & dec
... inc r16/r32 (opcode 0x40-0x47) ... goto twobyte_special_insn; ...
switch { ... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel)