From: William Kosasih <kosasihwilliam4@gmail.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, William Kosasih <kosasihwilliam4@gmail.com>
Subject: [PATCH v3 00/12] target/arm: Fix M-profile helper loads/stores alignment checks
Date: Wed, 2 Jul 2025 20:49:42 +0930 [thread overview]
Message-ID: <20250702111954.128563-1-kosasihwilliam4@gmail.com> (raw)
Historically, M-profile helper functions in m_helper.c and mve_helper.c
used the unaligned cpu_*_data_ra() routines to perform guest memory
accesses. This meant we had no way to enforce alignment constraints
when executing helper-based loads/stores. With the addition of the
cpu_*_mmu() APIs, we can now combine the current MMU state with MO_ALIGN
flags to build a MemOpIdx that enforces alignment at the helper level.
This patch series:
- Replaces all calls to cpu_ld*_data_ra(), cpu_st*_data_ra()
in the M-profile helpers (m_helper.c) and the MVE helpers
(mve_helper.c) with their cpu_*_mmu() equivalents.
- Leaves SME and SVE helper code untouched, as those extensions
support unaligned accesses by design.
With this change, all M-profile and MVE helper-based loads and stores
will now correctly honor their alignment requirements.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1154
Signed-off-by: William Kosasih <kosasihwilliam4@gmail.com>
William Kosasih (12):
target/arm: Bring VLSTM/VLLDM helper store/load closer to the ARM
pseudocode
target/arm: Fix BLXNS helper store alignment checks
target/arm: Fix function_return helper load alignment checks
target/arm: Fix VLDR helper load alignment checks
target/arm: Fix VSTR helper store alignment checks
target/arm: Fix VLDR_SG helper load alignment checks
target/arm: Fix VSTR_SG helper store alignment checks
target/arm: Fix VLD4 helper load alignment checks
target/arm: Fix VLD2 helper load alignment checks
target/arm: Fix VST4 helper store alignment checks
target/arm: Fix VST2 helper store alignment checks
target/arm: Fix helper macros indentation in mve_helper.c
target/arm/tcg/m_helper.c | 33 +--
target/arm/tcg/mve_helper.c | 390 ++++++++++++++++++++----------------
2 files changed, 236 insertions(+), 187 deletions(-)
--
2.48.1
next reply other threads:[~2025-07-02 11:22 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 11:19 William Kosasih [this message]
2025-07-02 11:19 ` [PATCH v3 01/12] target/arm: Bring VLSTM/VLLDM helper store/load closer to the ARM pseudocode William Kosasih
2025-07-02 14:33 ` Richard Henderson
2025-07-02 11:19 ` [PATCH v3 02/12] target/arm: Fix BLXNS helper store alignment checks William Kosasih
2025-07-02 14:36 ` Richard Henderson
2025-07-02 11:19 ` [PATCH v3 03/12] target/arm: Fix function_return helper load " William Kosasih
2025-07-02 14:38 ` Richard Henderson
2025-07-02 11:19 ` [PATCH v3 04/12] target/arm: Fix VLDR " William Kosasih
2025-07-02 14:39 ` Richard Henderson
2025-07-02 14:44 ` Richard Henderson
2025-07-03 8:31 ` William Kosasih
2025-07-02 11:19 ` [PATCH v3 05/12] target/arm: Fix VSTR helper store " William Kosasih
2025-07-02 14:41 ` Richard Henderson
2025-07-02 11:19 ` [PATCH v3 06/12] target/arm: Fix VLDR_SG helper load " William Kosasih
2025-07-02 14:46 ` Richard Henderson
2025-07-02 11:19 ` [PATCH v3 07/12] target/arm: Fix VSTR_SG helper store " William Kosasih
2025-07-02 14:47 ` Richard Henderson
2025-07-02 11:19 ` [PATCH v3 08/12] target/arm: Fix VLD4 helper load " William Kosasih
2025-07-02 14:48 ` Richard Henderson
2025-07-02 11:19 ` [PATCH v3 09/12] target/arm: Fix VLD2 " William Kosasih
2025-07-02 14:50 ` Richard Henderson
2025-07-02 11:19 ` [PATCH v3 10/12] target/arm: Fix VST4 helper store " William Kosasih
2025-07-02 14:51 ` Richard Henderson
2025-07-02 11:19 ` [PATCH v3 11/12] target/arm: Fix VST2 " William Kosasih
2025-07-02 14:51 ` Richard Henderson
2025-07-02 11:19 ` [PATCH v3 12/12] target/arm: Fix helper macros indentation in mve_helper.c William Kosasih
2025-07-02 14:53 ` Richard Henderson
2025-07-03 8:34 ` William Kosasih
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=20250702111954.128563-1-kosasihwilliam4@gmail.com \
--to=kosasihwilliam4@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@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 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).