qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/12] target/arm: Fix M-profile helper loads/stores alignment checks
@ 2025-07-01 10:31 William Kosasih
  2025-07-01 10:31 ` [PATCH v2 01/12] target/arm: Fix VLSTM/VLLDM helper load/store " William Kosasih
                   ` (11 more replies)
  0 siblings, 12 replies; 16+ messages in thread
From: William Kosasih @ 2025-07-01 10:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-arm, Peter Maydell, William Kosasih

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: Fix VLSTM/VLLDM helper load/store alignment checks
  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 | 408 ++++++++++++++++++++----------------
 2 files changed, 254 insertions(+), 187 deletions(-)

-- 
2.48.1



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-07-02 11:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-01 10:31 [PATCH v2 00/12] target/arm: Fix M-profile helper loads/stores alignment checks William Kosasih
2025-07-01 10:31 ` [PATCH v2 01/12] target/arm: Fix VLSTM/VLLDM helper load/store " William Kosasih
2025-07-02  2:06   ` Richard Henderson
2025-07-01 10:31 ` [PATCH v2 02/12] target/arm: Fix BLXNS helper store " William Kosasih
2025-07-01 10:31 ` [PATCH v2 03/12] target/arm: Fix function_return helper load " William Kosasih
2025-07-01 10:31 ` [PATCH v2 04/12] target/arm: Fix VLDR " William Kosasih
2025-07-02  2:29   ` Richard Henderson
2025-07-02 11:16     ` William Kosasih
2025-07-01 10:31 ` [PATCH v2 05/12] target/arm: Fix VSTR helper store " William Kosasih
2025-07-01 10:31 ` [PATCH v2 06/12] target/arm: Fix VLDR_SG helper load " William Kosasih
2025-07-01 10:31 ` [PATCH v2 07/12] target/arm: Fix VSTR_SG helper store " William Kosasih
2025-07-01 10:31 ` [PATCH v2 08/12] target/arm: Fix VLD4 helper load " William Kosasih
2025-07-01 10:31 ` [PATCH v2 09/12] target/arm: Fix VLD2 " William Kosasih
2025-07-01 10:31 ` [PATCH v2 10/12] target/arm: Fix VST4 helper store " William Kosasih
2025-07-01 10:31 ` [PATCH v2 11/12] target/arm: Fix VST2 " William Kosasih
2025-07-01 10:31 ` [PATCH v2 12/12] target/arm: Fix helper macros indentation in mve_helper.c William Kosasih

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).