On 10/14/19 3:48 AM, Alex Bennée wrote: > diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c > index defc8d5929..1210d8f243 100644 > --- a/accel/tcg/cputlb.c > +++ b/accel/tcg/cputlb.c > @@ -1811,6 +1811,7 @@ void helper_be_stq_mmu(CPUArchState *env, target_ulong > addr, uint64_t val, > #define ATOMIC_MMU_DECLS > #define ATOMIC_MMU_LOOKUP atomic_mmu_lookup(env, addr, oi, retaddr) > #define ATOMIC_MMU_CLEANUP > +#define ATOMIC_MMU_IDX oi
That is not the mmu_idx. That's the whole mmu_idx + MemOp combo. Use get_mmuidx(oi). > --- a/accel/tcg/user-exec.c > +++ b/accel/tcg/user-exec.c > @@ -751,6 +751,7 @@ static void *atomic_mmu_lookup(CPUArchState *env, > target_ulong addr, > #define ATOMIC_MMU_DECLS do {} while (0) > #define ATOMIC_MMU_LOOKUP atomic_mmu_lookup(env, addr, DATA_SIZE, GETPC()) > #define ATOMIC_MMU_CLEANUP do { clear_helper_retaddr(); } while (0) > +#define ATOMIC_MMU_IDX 0 MMU_USER_IDX. Best to be consistent, even if this is user-only and it isn't really used. > --- a/include/exec/cpu_ldst_useronly_template.h > +++ b/include/exec/cpu_ldst_useronly_template.h > @@ -73,7 +73,7 @@ glue(glue(cpu_ld, USUFFIX), MEMSUFFIX)(CPUArchState *env, > abi_ptr ptr) > #else > trace_guest_mem_before_exec( > env_cpu(env), ptr, > - trace_mem_build_info(SHIFT, false, MO_TE, false)); > + trace_mem_build_info(SHIFT, false, MO_TE, false, 0)); Likewise for the other uses in this file. r~