From: Tom Lendacky <thomas.lendacky@amd.com>
To: Wu Zongyong <wuzongyong@linux.alibaba.com>,
tglx@linutronix.de, mingo@redhat.com,
dave.hansen@linux.intel.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Cc: tony.luck@intel.com, kirill.shutemov@linux.intel.com,
wutu.xq2@linux.alibaba.com
Subject: Re: [RFC PATCH] x86/insn: support decode MOVSXD instruction for MMIO
Date: Wed, 29 Mar 2023 08:49:24 -0500 [thread overview]
Message-ID: <17b65c2a-69a8-6348-da64-641d34be122e@amd.com> (raw)
In-Reply-To: <1655f5dc49ab77f94e350ecbdc93e8d9b31acf61.1680058548.git.wuzongyong@linux.alibaba.com>
On 3/28/23 21:59, Wu Zongyong wrote:
> It seems MOVSXD which opcode is 0x63 is not handled, support
> to decode it in insn_decode_mmio().
Aren't there some caveats to worry about with this instruction based on
the presence of the REX prefix 64-bit operand size bit? Sometimes it can
be a sign extended and sometimes it can be a zero extended.
Thanks,
Tom
>
> Signed-off-by: Wu Zongyong <wuzongyong@linux.alibaba.com>
> ---
> arch/x86/lib/insn-eval.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/x86/lib/insn-eval.c b/arch/x86/lib/insn-eval.c
> index 558a605929db..db6f93bad219 100644
> --- a/arch/x86/lib/insn-eval.c
> +++ b/arch/x86/lib/insn-eval.c
> @@ -1607,6 +1607,10 @@ enum insn_mmio_type insn_decode_mmio(struct insn *insn, int *bytes)
> return INSN_MMIO_DECODE_FAILED;
>
> switch (insn->opcode.bytes[0]) {
> + case 0x63: /* MOVSXD r64, m32 */
> + *bytes = 4;
> + type = INSN_MMIO_READ_SIGN_EXTEND;
> + break;
> case 0x88: /* MOV m8,r8 */
> *bytes = 1;
> fallthrough;
next prev parent reply other threads:[~2023-03-29 13:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 2:59 [RFC PATCH] x86/insn: support decode MOVSXD instruction for MMIO Wu Zongyong
2023-03-29 13:49 ` Tom Lendacky [this message]
2023-03-30 2:55 ` Wu Zongyong
2023-03-30 12:39 ` kirill.shutemov
2023-03-31 2:24 ` Wu Zongyong
2023-03-31 8:49 ` David Laight
2023-03-31 10:06 ` Kirill A. Shutemov
2023-03-31 13:40 ` Tom Lendacky
2023-03-31 14:09 ` Kirill A. Shutemov
2023-03-31 14:33 ` Tom Lendacky
2023-03-31 15:25 ` Kirill A. Shutemov
2023-03-31 15:50 ` Tom Lendacky
2023-03-31 15:59 ` David Laight
2023-03-31 15:30 ` Dave Hansen
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=17b65c2a-69a8-6348-da64-641d34be122e@amd.com \
--to=thomas.lendacky@amd.com \
--cc=dave.hansen@linux.intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=wutu.xq2@linux.alibaba.com \
--cc=wuzongyong@linux.alibaba.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox