diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2010-06-17 05:33:55 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 03:46:55 -0400 |
commit | 7d5993d63f2bac75b89e171a7098044ec4bc701f (patch) | |
tree | 88d4b4d97662b147d01094983a31071e9e0ea33e /arch | |
parent | 6045be5dea7f7905433585e524f884b711e3796a (diff) |
KVM: x86 emulator: fix group3 instruction decoding
Group 3 instruction with ModRM reg field as 001 is
defined as test instruction under AMD arch, and
emulate_grp3() is ready for emulate it, so fix the
decoding.
static inline int emulate_grp3(...)
{
...
switch (c->modrm_reg) {
case 0 ... 1: /* test */
emulate_2op_SrcV("test", c->src, c->dst, ctxt->eflags);
...
}
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/emulate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index c990db0a3a02..abb8cec420a2 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -336,11 +336,11 @@ static u32 group_table[] = { | |||
336 | [Group1A*8] = | 336 | [Group1A*8] = |
337 | DstMem | SrcNone | ModRM | Mov | Stack, 0, 0, 0, 0, 0, 0, 0, | 337 | DstMem | SrcNone | ModRM | Mov | Stack, 0, 0, 0, 0, 0, 0, 0, |
338 | [Group3_Byte*8] = | 338 | [Group3_Byte*8] = |
339 | ByteOp | SrcImm | DstMem | ModRM, 0, | 339 | ByteOp | SrcImm | DstMem | ModRM, ByteOp | SrcImm | DstMem | ModRM, |
340 | ByteOp | DstMem | SrcNone | ModRM, ByteOp | DstMem | SrcNone | ModRM, | 340 | ByteOp | DstMem | SrcNone | ModRM, ByteOp | DstMem | SrcNone | ModRM, |
341 | 0, 0, 0, 0, | 341 | 0, 0, 0, 0, |
342 | [Group3*8] = | 342 | [Group3*8] = |
343 | DstMem | SrcImm | ModRM, 0, | 343 | DstMem | SrcImm | ModRM, DstMem | SrcImm | ModRM, |
344 | DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM, | 344 | DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM, |
345 | 0, 0, 0, 0, | 345 | 0, 0, 0, 0, |
346 | [Group4*8] = | 346 | [Group4*8] = |