From: Avi Kivity <avi@redhat.com>
To: Nadav Amit <namit@cs.technion.ac.il>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, Nadav Amit <nadav.amit@gmail.com>
Subject: Re: [PATCH] KVM: Fix MOVSX emulation
Date: Sun, 15 Jan 2012 11:56:52 +0200 [thread overview]
Message-ID: <4F12A2E4.6050304@redhat.com> (raw)
In-Reply-To: <1326566048-6756-1-git-send-email-namit@cs.technion.ac.il>
On 01/14/2012 08:34 PM, Nadav Amit wrote:
> The destination register of MOVSX should be decoded similarily to MOVZX.
>
> Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
> ---
> arch/x86/kvm/emulate.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index 05a562b..7644a83 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -3553,7 +3553,8 @@ static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op,
> case OpReg:
> decode_register_operand(ctxt, op,
> op == &ctxt->dst &&
> - ctxt->twobyte && (ctxt->b == 0xb6 || ctxt->b == 0xb7));
> + ctxt->twobyte && ((ctxt->b & 0xfe) == 0xb6 ||
> + (ctxt->b & 0xfe) == 0xbe));
> break;
> case OpImmUByte:
> rc = decode_imm(ctxt, op, 1, false);
Please post a unit test for this. See
git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git x86/emulate.c.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-01-15 9:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-14 18:34 [PATCH] KVM: Fix MOVSX emulation Nadav Amit
2012-01-15 9:56 ` Avi Kivity [this message]
2012-01-15 15:02 ` Nadav Amit
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=4F12A2E4.6050304@redhat.com \
--to=avi@redhat.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=nadav.amit@gmail.com \
--cc=namit@cs.technion.ac.il \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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.