[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 15/26] target/arm: Introduce arm_mmu_idx
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 15/26] target/arm: Introduce arm_mmu_idx |
Date: |
Tue, 11 Dec 2018 15:43:17 +0000 |
On Fri, 7 Dec 2018 at 10:36, Richard Henderson
<address@hidden> wrote:
>
> The pattern
>
> ARMMMUIdx mmu_idx = core_to_arm_mmu_idx(env, cpu_mmu_index(env, false));
>
> is computing the full ARMMMUIdx, stripping off the ARM bits,
> and then putting them back.
>
> Avoid the extra two steps with the appropriate helper function.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> target/arm/cpu.h | 1 +
> target/arm/helper.c | 27 ++++++++++++++++-----------
> 2 files changed, 17 insertions(+), 11 deletions(-)
>
> diff --git a/target/arm/cpu.h b/target/arm/cpu.h
> index 18f2378b87..6bac5c18d0 100644
> --- a/target/arm/cpu.h
> +++ b/target/arm/cpu.h
> @@ -2740,6 +2740,7 @@ ARMMMUIdx
> arm_v7m_mmu_idx_for_secstate_and_priv(CPUARMState *env,
> ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate);
>
> /* Determine the current mmu_idx to use for normal loads/stores */
> +ARMMMUIdx arm_mmu_idx(CPUARMState *env);
> int cpu_mmu_index(CPUARMState *env, bool ifetch);
Could we give the new function its own comment rather than
making it share with the existing function, please?
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
- [Qemu-devel] [PATCH 08/26] target/arm: Decode PAuth within disas_data_proc_2src, (continued)
- [Qemu-devel] [PATCH 08/26] target/arm: Decode PAuth within disas_data_proc_2src, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 07/26] target/arm: Decode PAuth within disas_data_proc_1src, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 09/26] target/arm: Move helper_exception_return to helper-a64.c, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 10/26] target/arm: Add new_pc argument to helper_exception_return, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 11/26] target/arm: Rearrange decode in disas_uncond_b_reg, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 15/26] target/arm: Introduce arm_mmu_idx, Richard Henderson, 2018/12/07
- Re: [Qemu-devel] [PATCH 15/26] target/arm: Introduce arm_mmu_idx,
Peter Maydell <=
- [Qemu-devel] [PATCH 13/26] target/arm: Decode Load/store register (pac), Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 12/26] target/arm: Decode PAuth within disas_uncond_b_reg, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 14/26] target/arm: Move cpu_mmu_index out of line, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 17/26] target/arm: Reuse aa64_va_parameters for setting tbflags, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 18/26] target/arm: Export aa64_va_parameters to internals.h, Richard Henderson, 2018/12/07