[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 15/15] nvic: Implement "user accesses BusFault"
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 15/15] nvic: Implement "user accesses BusFault" SCS region behaviour |
Date: |
Thu, 3 Aug 2017 15:23:19 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 08/02/2017 09:44 AM, Peter Maydell wrote:
> The ARMv7M architecture specifies that most of the addresses in the
> PPB region (which includes the NVIC, systick and system registers)
> are not accessible to unprivileged accesses, which should
> BusFault with a few exceptions:
> * the STIR is configurably user-accessible
> * the ITM (which we don't implement at all) is always
> user-accessible
>
> Implement this by switching the register access functions
> to the _with_attrs scheme that lets us distinguish user
> mode accesses.
>
> This allows us to pull the handling of the CCR.USERSETMPEND
> flag up to the level where we can make it generate a BusFault
> as it should for non-permitted accesses.
>
> Note that until the core ARM CPU code implements turning
> MEMTX_ERROR into a BusFault the registers will continue to
> act as RAZ/WI to user accesses.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> hw/intc/armv7m_nvic.c | 58
> ++++++++++++++++++++++++++++++++++++---------------
> 1 file changed, 41 insertions(+), 17 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~
- [Qemu-devel] [PATCH 14/15] armv7m_nvic.h: Move from include/hw/arm to include/hw/intc, (continued)
- [Qemu-devel] [PATCH 14/15] armv7m_nvic.h: Move from include/hw/arm to include/hw/intc, Peter Maydell, 2017/08/02
- [Qemu-devel] [PATCH 01/15] target/arm: Use MMUAccessType enum rather than int, Peter Maydell, 2017/08/02
- [Qemu-devel] [PATCH 15/15] nvic: Implement "user accesses BusFault" SCS region behaviour, Peter Maydell, 2017/08/02
- [Qemu-devel] [PATCH 12/15] target/arm: Don't calculate lr in arm_v7m_cpu_do_interrupt() until needed, Peter Maydell, 2017/08/02
- [Qemu-devel] [PATCH 10/15] target/arm: Don't use cpsr_write/cpsr_read to transfer M profile XPSR, Peter Maydell, 2017/08/02
- [Qemu-devel] [PATCH 07/15] target/arm: Fix outdated comment about exception exit, Peter Maydell, 2017/08/02