[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target/arm: Escalate to correct HardFault when
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH] target/arm: Escalate to correct HardFault when AIRCR.BFHFNMINS is set |
Date: |
Mon, 23 Jul 2018 08:39:47 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 07/23/2018 05:34 AM, Peter Maydell wrote:
> When we escalate a v8M exception to HardFault, if AIRCR.BFHFNMINNS is
> set then we need to decide whether it should become a secure HardFault
> or a nonsecure HardFault. We should always escalate to the same
> target security state as the original exception. The current code
> tries to test this using the 'secure' bool, which is not right because
> that flag indicates whether the target security state only for
> banked exceptions; the effect was that we were incorrectly escalating
> always-secure exceptions like SecureFault to a nonsecure HardFault.
>
> Fix this by defining, logging and using a new 'targets_secure' bool
> which tracks the condition we actually want.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> hw/intc/armv7m_nvic.c | 8 ++++++--
> hw/intc/trace-events | 2 +-
> 2 files changed, 7 insertions(+), 3 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~