[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 42/55] tcg: Add helper_unaligned_mmu for user-only sigbus
From: |
Richard Henderson |
Subject: |
[PATCH v2 42/55] tcg: Add helper_unaligned_mmu for user-only sigbus |
Date: |
Mon, 2 Aug 2021 18:14:30 -1000 |
To be called from tcg generated code on hosts that support
unaligned accesses natively, in response to an access that
is supposed to be aligned.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/tcg/tcg-ldst.h | 5 +++++
accel/tcg/user-exec.c | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/include/tcg/tcg-ldst.h b/include/tcg/tcg-ldst.h
index 8c86365611..a934bed042 100644
--- a/include/tcg/tcg-ldst.h
+++ b/include/tcg/tcg-ldst.h
@@ -70,5 +70,10 @@ void helper_be_stl_mmu(CPUArchState *env, target_ulong addr,
uint32_t val,
void helper_be_stq_mmu(CPUArchState *env, target_ulong addr, uint64_t val,
MemOpIdx oi, uintptr_t retaddr);
+#else
+
+void QEMU_NORETURN helper_unaligned_mmu(CPUArchState *env, target_ulong addr,
+ uint32_t type, uintptr_t ra);
+
#endif /* CONFIG_SOFTMMU */
#endif /* TCG_LDST_H */
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 46b74b5f70..2da11aeca0 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -27,6 +27,7 @@
#include "exec/helper-proto.h"
#include "qemu/atomic128.h"
#include "trace/trace-root.h"
+#include "tcg/tcg-ldst.h"
#include "internal.h"
#undef EAX
@@ -867,6 +868,12 @@ static void validate_memop(MemOpIdx oi, MemOp expected)
#endif
}
+void helper_unaligned_mmu(CPUArchState *env, target_ulong addr,
+ uint32_t access_type, uintptr_t ra)
+{
+ cpu_unaligned_access(env_cpu(env), addr, access_type, MMU_USER_IDX, ra);
+}
+
static void *cpu_mmu_lookup(CPUArchState *env, target_ulong addr,
MemOpIdx oi, uintptr_t ra, MMUAccessType type)
{
--
2.25.1
- [PATCH v2 35/55] accel/tcg: Move cpu_atomic decls to exec/cpu_ldst.h, (continued)
- [PATCH v2 35/55] accel/tcg: Move cpu_atomic decls to exec/cpu_ldst.h, Richard Henderson, 2021/08/03
- [PATCH v2 37/55] target/mips: Use 8-byte memory ops for msa load/store, Richard Henderson, 2021/08/03
- [PATCH v2 38/55] target/s390x: Use cpu_*_mmu instead of helper_*_mmu, Richard Henderson, 2021/08/03
- [PATCH v2 32/55] target/s390x: Use MO_128 for 16 byte atomics, Richard Henderson, 2021/08/03
- [PATCH v2 36/55] target/mips: Use cpu_*_data_ra for msa load/store, Richard Henderson, 2021/08/03
- [PATCH v2 40/55] target/arm: Use cpu_*_mmu instead of helper_*_mmu, Richard Henderson, 2021/08/03
- [PATCH v2 41/55] tcg: Move helper_*_mmu decls to tcg/tcg-ldst.h, Richard Henderson, 2021/08/03
- [PATCH v2 42/55] tcg: Add helper_unaligned_mmu for user-only sigbus,
Richard Henderson <=
- [PATCH v2 43/55] tcg/i386: Support raising sigbus for user-only, Richard Henderson, 2021/08/03
- [PATCH v2 44/55] tests/tcg/multiarch: Add sigbus.c, Richard Henderson, 2021/08/03
- [PATCH v2 46/55] linux-user: Disable more prctl subcodes, Richard Henderson, 2021/08/03
- [PATCH v2 47/55] hw/core/cpu: Re-sort the non-pointers to the end of CPUClass, Richard Henderson, 2021/08/03
- [PATCH v2 45/55] linux-user: Split out do_prctl and subroutines, Richard Henderson, 2021/08/03
- [PATCH v2 48/55] linux-user: Add code for PR_GET/SET_UNALIGN, Richard Henderson, 2021/08/03
- [PATCH v2 49/55] hw/core/cpu: Move cpu properties to cpu-sysemu.c, Richard Henderson, 2021/08/03
- [PATCH v2 50/55] hw/core/cpu: Add prctl-unalign-sigbus property for user-only, Richard Henderson, 2021/08/03
- [PATCH v2 51/55] target/alpha: Reorg fp memory operations, Richard Henderson, 2021/08/03
- [PATCH v2 52/55] target/alpha: Reorg integer memory operations, Richard Henderson, 2021/08/03