From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, kvm@vger.kernel.org
Subject: [PATCH] KVM: x86 emulator: fix group3 instruction decoding
Date: Thu, 17 Jun 2010 17:33:55 +0800 [thread overview]
Message-ID: <4C19EC03.50509@cn.fujitsu.com> (raw)
In-Reply-To: <20100616140927.GA1662@amt.cnet>
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>
---
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 c990db0..abb8cec 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -336,11 +336,11 @@ static u32 group_table[] = {
[Group1A*8] =
DstMem | SrcNone | ModRM | Mov | Stack, 0, 0, 0, 0, 0, 0, 0,
[Group3_Byte*8] =
- ByteOp | SrcImm | DstMem | ModRM, 0,
+ ByteOp | SrcImm | DstMem | ModRM, ByteOp | SrcImm | DstMem | ModRM,
ByteOp | DstMem | SrcNone | ModRM, ByteOp | DstMem | SrcNone | ModRM,
0, 0, 0, 0,
[Group3*8] =
- DstMem | SrcImm | ModRM, 0,
+ DstMem | SrcImm | ModRM, DstMem | SrcImm | ModRM,
DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM,
0, 0, 0, 0,
[Group4*8] =
--
1.7.0.4
next prev parent reply other threads:[~2010-06-17 9:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-15 1:00 [PATCH] KVM: x86 emulator: fix pusha instruction emulation Wei Yongjun
2010-06-15 1:03 ` [PATCHv2] " Wei Yongjun
2010-06-15 2:10 ` [PATCH] test: add test for pusha and popa instructions Wei Yongjun
2010-06-20 8:29 ` Avi Kivity
2010-06-21 2:48 ` Wei Yongjun
2010-06-21 13:15 ` Avi Kivity
2010-06-15 11:00 ` [PATCHv2] KVM: x86 emulator: fix pusha instruction emulation Avi Kivity
2010-06-16 14:09 ` [PATCH] " Marcelo Tosatti
2010-06-17 9:33 ` Wei Yongjun [this message]
2010-06-17 12:00 ` [PATCH] KVM: x86 emulator: fix group3 instruction decoding Avi Kivity
2010-06-18 0:51 ` Wei Yongjun
2010-06-20 8:24 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C19EC03.50509@cn.fujitsu.com \
--to=yjwei@cn.fujitsu.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.