[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 34/55] accel/tcg: Add cpu_{ld,st}*_mmu interfaces
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 34/55] accel/tcg: Add cpu_{ld,st}*_mmu interfaces |
Date: |
Wed, 18 Aug 2021 11:01:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 8/3/21 6:14 AM, Richard Henderson wrote:
> These functions are much closer to the softmmu helper
> functions, in that they take the complete MemOpIdx,
> and from that they may enforce required alignment.
>
> The previous cpu_ldst.h functions did not have alignment info,
> and so did not enforce it. Retain this by adding MO_UNALN to
> the MemOp that we create in calling the new functions.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> docs/devel/loads-stores.rst | 52 ++++-
> include/exec/cpu_ldst.h | 245 ++++++++--------------
> accel/tcg/cputlb.c | 392 ++++++++++++------------------------
> accel/tcg/user-exec.c | 390 +++++++++++++++--------------------
> accel/tcg/ldst_common.c.inc | 307 ++++++++++++++++++++++++++++
> 5 files changed, 722 insertions(+), 664 deletions(-)
> create mode 100644 accel/tcg/ldst_common.c.inc
> Function names follow the pattern:
>
> +load: ``cpu_ld{size}{end}_mmu(env, ptr, oi, retaddr)``
> +
> +store: ``cpu_st{size}{end}_mmu(env, ptr, val, oi, retaddr)``
> +
> +``size``
> + - ``b`` : 8 bits
> + - ``w`` : 16 bits
> + - ``l`` : 32 bits
> + - ``q`` : 64 bits
kinda unrelated to this patch, but what would be the pattern
for 128 bits? ``o`` for octoword?
> +
> +``end``
> + - (empty) : for target endian, or 8 bit sizes
> + - ``_be`` : big endian
> + - ``_le`` : little endian
> +
> +Regexes for git grep:
> + - ``\<cpu_ld[bwlq](_[bl]e)\?_mmu\>``
> + - ``\<cpu_st[bwlq](_[bl]e)\?_mmu\>``
- Re: [PATCH v2 19/55] target/xtensa: Implement do_unaligned_access for user-only, (continued)
- [PATCH v2 22/55] tcg: Expand MO_SIZE to 3 bits, Richard Henderson, 2021/08/03
- [PATCH v2 24/55] tcg: Split out MemOpIdx to exec/memopidx.h, Richard Henderson, 2021/08/03
- [PATCH v2 23/55] tcg: Rename TCGMemOpIdx to MemOpIdx, Richard Henderson, 2021/08/03
- [PATCH v2 26/55] accel/tcg: Pass MemOpIdx to atomic_trace_*_post, Richard Henderson, 2021/08/03
- [PATCH v2 25/55] trace/mem: Pass MemOpIdx to trace_mem_get_info, Richard Henderson, 2021/08/03
- [PATCH v2 29/55] target/arm: Use MO_128 for 16 byte atomics, Richard Henderson, 2021/08/03
- [PATCH v2 28/55] trace: Split guest_mem_before, Richard Henderson, 2021/08/03
- [PATCH v2 34/55] accel/tcg: Add cpu_{ld,st}*_mmu interfaces, Richard Henderson, 2021/08/03
- Re: [PATCH v2 34/55] accel/tcg: Add cpu_{ld,st}*_mmu interfaces,
Philippe Mathieu-Daudé <=
- [PATCH v2 27/55] plugins: Reorg arguments to qemu_plugin_vcpu_mem_cb, Richard Henderson, 2021/08/03
- [PATCH v2 39/55] target/sparc: Use cpu_*_mmu instead of helper_*_mmu, Richard Henderson, 2021/08/03
- [PATCH v2 31/55] target/ppc: Use MO_128 for 16 byte atomics, Richard Henderson, 2021/08/03
- [PATCH v2 30/55] target/i386: Use MO_128 for 16 byte atomics, Richard Henderson, 2021/08/03
- [PATCH v2 33/55] target/hexagon: Implement cpu_mmu_index, Richard Henderson, 2021/08/03
- [PATCH v2 35/55] accel/tcg: Move cpu_atomic decls to exec/cpu_ldst.h, Richard Henderson, 2021/08/03