[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 4/7] target/arm: Split M profile MNegPri mmu index
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [PATCH 4/7] target/arm: Split M profile MNegPri mmu index into user and priv |
Date: |
Sun, 3 Dec 2017 07:09:27 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 12/01/2017 10:44 AM, Peter Maydell wrote:
> For M profile, we currently have an mmu index MNegPri for
> "requested execution priority negative". This fails to
> distinguish "requested execution priority negative, privileged"
> from "requested execution priority negative, usermode", but
> the two can return different results for MPU lookups. Fix this
> by splitting MNegPri into MNegPriPriv and MNegPriUser, and
> similarly for the Secure equivalent MSNegPri.
>
> This takes us from 6 M profile MMU modes to 8, which means
> we need to bump NB_MMU_MODES; this is OK since the point
> where we are forced to reduce TLB sizes is 9 MMU modes.
>
> (It would in theory be possible to stick with 6 MMU indexes:
> {mpu-disabled,user,privileged} x {secure,nonsecure} since
> in the MPU-disabled case the result of an MPU lookup is
> always the same for both user and privileged code. However
> we would then need to rework the TB flags handling to put
> user/priv into the TB flags separately from the mmuidx.
> Adding an extra couple of mmu indexes is simpler.)
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> target/arm/cpu.h | 49 ++++++++++++++++++++++++++++---------------------
> target/arm/internals.h | 6 ++++--
> target/arm/helper.c | 14 ++++++++++----
> target/arm/translate.c | 8 ++++++--
> 4 files changed, 48 insertions(+), 29 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~