[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in tlbi_aa64_vae2is_write: tlbbits_for_regime called with swappe
From: |
Peter Maydell |
Subject: |
Re: Bug in tlbi_aa64_vae2is_write: tlbbits_for_regime called with swapped ARMMMUIdx_ values? |
Date: |
Mon, 22 Mar 2021 14:21:06 +0000 |
On Tue, 16 Mar 2021 at 15:07, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 3/15/21 11:33 PM, Rebecca Cran wrote:
> > I noticed the following in tlbi_aa64_vae2is_write: it appears that when
> > calling
> > tlbbits_for_regime the ARMMMUIdx values are swapped?
> >
> > static void tlbi_aa64_vae2is_write(CPUARMState *env, const ARMCPRegInfo *ri,
> > uint64_t value)
> > {
> > CPUState *cs = env_cpu(env);
> > uint64_t pageaddr = sextract64(value << 12, 0, 56);
> > bool secure = arm_is_secure_below_el3(env);
> > int mask = secure ? ARMMMUIdxBit_SE2 : ARMMMUIdxBit_E2;
> > int bits = tlbbits_for_regime(env, secure ? ARMMMUIdx_E2 :
> > ARMMMUIdx_SE2,
>
> Yep, good catch.
Would somebody like to write a patch with the fix ?
thanks
-- PMM