On Mon, Aug 28, 2023 at 06:52:42PM -0400, Stefan Hajnoczi wrote:
> On Thu, 24 Aug 2023 at 14:29, Richard Henderson
> <richard.hender...@linaro.org> wrote:
> >
> > The following changes since commit 50e7a40af372ee5931c99ef7390f5d3d6fbf6ec4:
> >
> >   Merge tag 'pull-target-arm-20230824' of 
> > https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-08-24 
> > 10:08:33 -0400)
> >
> > are available in the Git repository at:
> >
> >   https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20230823-2
> >
> > for you to fetch changes up to 4daad8d9d6b9d426beb8ce505d2164ba36ea3168:
> >
> >   tcg: spelling fixes (2023-08-24 11:22:42 -0700)
> >
> > ----------------------------------------------------------------
> > accel/*: Widen pc/saved_insn for *_sw_breakpoint
> > accel/tcg: Replace remaining target_ulong in system-mode accel
> > tcg: spelling fixes
> > tcg: Document bswap, hswap, wswap byte patterns
> > tcg: Introduce negsetcond opcodes
> > tcg: Fold deposit with zero to and
> > tcg: Unify TCG_TARGET_HAS_extr[lh]_i64_i32
> > tcg/i386: Drop BYTEH deposits for 64-bit
> > tcg/i386: Allow immediate as input to deposit
> > target/*: Use tcg_gen_negsetcond_*
>
> Hi Richard,
> I'm seeing a segfault in "make docker-test-tcg@debian-tricore-cross"
> after this pull request.

git bisect points to:

commit fc15bfb6a6bda8d4d01f1383579d385acae17c0f
Author: Anton Johansson <a...@rev.ng>
Date:   Mon Aug 7 17:57:03 2023 +0200

    include/exec: typedef abi_ptr to vaddr in softmmu

    In system mode, abi_ptr is primarily used for representing addresses
    when accessing guest memory with cpu_[st|ld]*(). Widening it from
    target_ulong to vaddr reduces the target dependence of these functions
    and is step towards building accel/ once for system mode.

    Signed-off-by: Anton Johansson <a...@rev.ng>
    Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
    Message-Id: <20230807155706.9580-7-a...@rev.ng>
    Signed-off-by: Richard Henderson <richard.hender...@linaro.org>

diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
index da10ba1433..f3ce4eb1d0 100644
--- a/include/exec/cpu_ldst.h
+++ b/include/exec/cpu_ldst.h
@@ -121,8 +121,8 @@ static inline bool guest_range_valid_untagged(abi_ulong 
start, abi_ulong len)
     h2g_nocheck(x); \
 })
 #else
-typedef target_ulong abi_ptr;
-#define TARGET_ABI_FMT_ptr TARGET_FMT_lx
+typedef vaddr abi_ptr;
+#define TARGET_ABI_FMT_ptr "%016" VADDR_PRIx
 #endif


Changeing typedef vaddr abi_ptr back to target_ulong fixes it.

The faulting TriCore insn is OPC1_32_BOL_ST_W_LONGOFF, that tries to write to
guest addr 0xd0000124, which is in a valid memory region.

Cheers,
Bastian

Reply via email to