]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86 emulator: fix group3 instruction decoding
authorWei Yongjun <yjwei@cn.fujitsu.com>
Thu, 17 Jun 2010 09:33:55 +0000 (17:33 +0800)
committerAvi Kivity <avi@redhat.com>
Sun, 1 Aug 2010 07:46:55 +0000 (10:46 +0300)
commita91bd71b3dc7fab62bc78f08b67c7eac9975933a
tree88d4b4d97662b147d01094983a31071e9e0ea33e
parentd8b4a565255492ec92b5c183d3f5bcf3807c9353
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>
arch/x86/kvm/emulate.c