qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 02/55] trace: add mmu_index to mem_info


From: Richard Henderson
Subject: Re: [PATCH v5 02/55] trace: add mmu_index to mem_info
Date: Mon, 14 Oct 2019 07:53:52 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]