[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 15/20] include/hw/core: Create struct CPUJumpCache
From: |
Ilya Leoshkevich |
Subject: |
Re: [PULL 15/20] include/hw/core: Create struct CPUJumpCache |
Date: |
Thu, 27 Oct 2022 16:18:56 +0200 |
On Tue, Oct 04, 2022 at 12:52:36PM -0700, Richard Henderson wrote:
> Wrap the bare TranslationBlock pointer into a structure.
>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> accel/tcg/tb-hash.h | 1 +
> accel/tcg/tb-jmp-cache.h | 24 ++++++++++++++++++++++++
> include/exec/cpu-common.h | 1 +
> include/hw/core/cpu.h | 15 +--------------
> include/qemu/typedefs.h | 1 +
> accel/stubs/tcg-stub.c | 4 ++++
> accel/tcg/cpu-exec.c | 10 +++++++---
> accel/tcg/cputlb.c | 9 +++++----
> accel/tcg/translate-all.c | 28 +++++++++++++++++++++++++---
> hw/core/cpu-common.c | 3 +--
> plugins/core.c | 2 +-
> trace/control-target.c | 2 +-
> 12 files changed, 72 insertions(+), 28 deletions(-)
> create mode 100644 accel/tcg/tb-jmp-cache.h
Hi,
After this patch, I get:
qemu-s390x: qemu/include/qemu/rcu.h:102: rcu_read_unlock: Assertion
`p_rcu_reader->depth != 0' failed.
in one of the wasmtime tests (host=x86_64, guest=s390x).
GDB shows that the root cause is actually this:
Thread 181 "wasi_tokio::pat" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff6c54640 (LWP 168352)]
0x0000555555626736 in do_tb_phys_invalidate (tb=tb@entry=0x7fffea4b8500
<code_gen_buffer+38503635>, rm_from_page_list=rm_from_page_list@entry=true) at
qemu/accel/tcg/translate-all.c:1192
1192 if (qatomic_read(&jc->array[h].tb) == tb) {
(gdb) bt
#0 0x0000555555626736 in do_tb_phys_invalidate (tb=tb@entry=0x7fffea4b8500
<code_gen_buffer+38503635>, rm_from_page_list=rm_from_page_list@entry=true) at
qemu/accel/tcg/translate-all.c:1192
#1 0x0000555555626b98 in tb_phys_invalidate__locked (tb=0x7fffea4b8500
<code_gen_buffer+38503635>) at qemu/accel/tcg/translate-all.c:1211
#2 tb_invalidate_phys_page_range__locked (p=<optimized out>,
start=start@entry=836716683264, end=end@entry=836716687360, retaddr=0,
pages=0x0) at qemu/accel/tcg/translate-all.c:1678
#3 0x0000555555626dfb in tb_invalidate_phys_range (start=836716683264,
start@entry=836716584960, end=end@entry=836716982272) at
qemu/accel/tcg/translate-all.c:1753
#4 0x0000555555639e43 in target_munmap (start=start@entry=836716584960,
len=len@entry=397312) at qemu/linux-user/mmap.c:769
Let me know if you need more information, I can try to extract a
minimal reproducer.
Best regards,
Ilya
- [PULL 06/20] accel/tcg: Suppress auto-invalidate in probe_access_internal, (continued)
- [PULL 06/20] accel/tcg: Suppress auto-invalidate in probe_access_internal, Richard Henderson, 2022/10/04
- [PULL 11/20] accel/tcg: Use bool for page_find_alloc, Richard Henderson, 2022/10/04
- [PULL 01/20] cpu: cache CPUClass in CPUState for hot code paths, Richard Henderson, 2022/10/04
- [PULL 09/20] include/exec: Introduce TARGET_PAGE_ENTRY_EXTRA, Richard Henderson, 2022/10/04
- [PULL 10/20] accel/tcg: Remove PageDesc code_bitmap, Richard Henderson, 2022/10/04
- [PULL 12/20] accel/tcg: Use DisasContextBase in plugin_gen_tb_start, Richard Henderson, 2022/10/04
- [PULL 13/20] accel/tcg: Do not align tb->page_addr[0], Richard Henderson, 2022/10/04
- [PULL 14/20] accel/tcg: Inline tb_flush_jmp_cache, Richard Henderson, 2022/10/04
- [PULL 18/20] accel/tcg: Introduce TARGET_TB_PCREL, Richard Henderson, 2022/10/04
- [PULL 15/20] include/hw/core: Create struct CPUJumpCache, Richard Henderson, 2022/10/04
- [PULL 16/20] hw/core: Add CPUClass.get_pc, Richard Henderson, 2022/10/04
- [PULL 19/20] tcg/ppc: Optimize 26-bit jumps, Richard Henderson, 2022/10/04
- [PULL 17/20] accel/tcg: Introduce tb_pc and log_pc, Richard Henderson, 2022/10/04
- [PULL 20/20] target/sh4: Fix TB_FLAG_UNALIGN, Richard Henderson, 2022/10/04
- Re: [PULL 00/20] tcg patch queue, Stefan Hajnoczi, 2022/10/05