From: alistair23@gmail.com
To: "Alvin Chang via" <qemu-riscv@nongnu.org>
Subject: Re: [PATCH v1 2/2] target/riscv: Write zero into mtinst/htinst for SSPUSH/SSPOPCHK faults
Date: Fri, 20 Nov 2026 00:02:03 +0000 [thread overview]
Message-ID: <sashiko-outbox-257@gmail.com> (raw)
In-Reply-To: <20261117132638.1452474-3-alvinga@andestech.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] target/riscv: Double-shift error in access_size calculation
- [High] target/riscv: incorrect access size calculation for transformed
instructions
--
- [HIGH] In target/riscv/tcg/cpu_helper.c (riscv_transformed_insn), the
access_size calculation contains a double-shift error. The first shift
calculates the byte width (e.g., 4 for a word), but the subsequent
access_size = 1 << access_size; turns that width into an incorrect
power of two (e.g., 16 for a word). This causes incorrect memory
access sizes for HLV/HSV instructions, leading to guest memory
corruption or incorrect state. Fix by removing the second shift.
--
Sashiko AI review · https://risc6-threadripper.alistair23.me/#/patchset/20261117132638.1452474-1-alvinga@andestech.com?part=2
prev parent reply other threads:[~2026-11-20 0:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 13:26 [PATCH v1 0/2] target/riscv: Write zero into mtinst/htinst for Zicfiss instructions Alvin Chang via
2026-11-17 13:26 ` Alvin Chang via qemu development
2026-11-17 13:26 ` [PATCH v1 1/2] target/riscv: Write zero into mtinst/htinst for SSAMOSWAP faults Alvin Chang via
2026-11-17 13:26 ` Alvin Chang via qemu development
2026-11-19 23:53 ` alistair23
2026-11-17 13:26 ` [PATCH v1 2/2] target/riscv: Write zero into mtinst/htinst for SSPUSH/SSPOPCHK faults Alvin Chang via
2026-11-17 13:26 ` Alvin Chang via qemu development
2026-11-20 0:02 ` alistair23 [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=sashiko-outbox-257@gmail.com \
--to=alistair23@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=qemu-riscv@nongnu.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.