|
From: | Greg Bellows |
Subject: | Re: [Qemu-devel] [PATCH v4 06/33] target-arm: make arm_current_pl() return PL3 |
Date: | Thu, 28 Aug 2014 08:53:43 -0500 |
On 1 July 2014 00:09, <address@hidden> wrote:
> From: Fabian Aggeler <address@hidden>
>
> Make arm_current_pl() return PL3 for secure PL1 and monitor mode.
> Increase MMU modes since mmu_index is directly infered from arm_
> current_pl(). Changes assertion in arm_el_is_aa64() to allow EL3.
> @@ -963,9 +963,12 @@ static inline int arm_current_pl(CPUARMState *env)This worries me a bit, because I suspect we have code that's
>
> if ((env->uncached_cpsr & 0x1f) == ARM_CPU_MODE_USR) {
> return 0;
> + } else if (arm_is_secure(env)) {
> + /* Secure PL1 and monitor mode are mapped to PL3 */
> + return 3;
> }
> - /* We don't currently implement the Virtualization or TrustZone
> - * extensions, so PL2 and PL3 don't exist for us.
> + /* We currently do not implement the Virtualization extensions, so PL2 does
> + * not exist for us.
> */
> return 1;
> }
treating arm_current_pl() as if it were arm_current_el(), ie that
Secure EL1 will return 1, not 3. Perhaps we need to have
both functions and check that all the callers are using the
right one?
thanks
-- PMM
[Prev in Thread] | Current Thread | [Next in Thread] |