This really made my day :-) Thanks Peter!
Best regards,
William
On Fri, Jul 4, 2025 at 22:29 Peter Maydell <peter.maydell@linaro.org> wrote:
> On Thu, 3 Jul 2025 at 09:56, William Kosasih <kosasihwilliam4@gmail.com>
> wrote:
> >
> > 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>
>
> Applied to target-arm.next. Thanks for these patches!
>
> -- PMM
>