From: Richard Henderson <richard.henderson@linaro.org>
To: Stevie Lavern <stevie.lavern@gmail.com>, qemu-devel@nongnu.org
Cc: eduardo@habkost.net, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] i386/tcg: generate an illegal op when translating AVX instructions
Date: Thu, 6 Jan 2022 10:22:02 -0800 [thread overview]
Message-ID: <29eeda88-97d1-417f-0287-bdda016ab9a1@linaro.org> (raw)
In-Reply-To: <CADV2EAuttJSjXMc1CHmyJ9ApjOFLJ8CKxa81LLQp3DAYn2A2ZA@mail.gmail.com>
On 1/6/22 2:35 AM, Stevie Lavern wrote:
> The AVX instruction set is not supported by Qemu.
> However, some AVX instructions are properly decoded and emulated as their
> legacy SSE version.
> This patch prevent this by generating an illegal_op instead of a bogus SSE
> instruction.
>
> Signed-off-by: Stevie Lavern <stevie.lavern@gmail.com <mailto:stevie.lavern@gmail.com>>
> ---
> target/i386/tcg/translate.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
> index 05f9336c9b..996fce65b2 100644
> --- a/target/i386/tcg/translate.c
> +++ b/target/i386/tcg/translate.c
> @@ -4706,6 +4706,11 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
> }
> }
>
> + if (s->vex_l & 1) {
The whole value should be 0, not only bit 0.
> + /* If set, registers are 256bits.
> + Fail as AVX extension is not supported. */
checkpatch.pl should have complained about the comment formatting:
/*
* multi line
* comment
*/
Otherwise it looks good.
r~
prev parent reply other threads:[~2022-01-06 18:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 10:35 [PATCH] i386/tcg: generate an illegal op when translating AVX instructions Stevie Lavern
2022-01-06 18:22 ` Richard Henderson [this message]
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=29eeda88-97d1-417f-0287-bdda016ab9a1@linaro.org \
--to=richard.henderson@linaro.org \
--cc=eduardo@habkost.net \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stevie.lavern@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).