qemu-e2k/target/arm
Peter Maydell 02ac2f7f61 target/arm: Avoid bogus NSACR traps on M-profile without Security Extension
In Arm v8.0 M-profile CPUs without the Security Extension and also in
v7M CPUs, there is no NSACR register. However, the code we have to handle
the FPU does not always check whether the ARM_FEATURE_M_SECURITY bit
is set before testing whether env->v7m.nsacr permits access to the
FPU. This means that for a CPU with an FPU but without the Security
Extension we would always take a bogus fault when trying to stack
the FPU registers on an exception entry.

We could fix this by adding extra feature bit checks for all uses,
but it is simpler to just make the internal value of nsacr 0xcff
("all non-secure accesses allowed"), since this is not guest
visible when the Security Extension is not present. This allows
us to continue to follow the Arm ARM pseudocode which takes a
similar approach. (In particular, in the v8.1 Arm ARM the register
is documented as reading as 0xcff in this configuration.)

Fixes: https://bugs.launchpad.net/qemu/+bug/1838475
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
Message-id: 20190801105742.20036-1-peter.maydell@linaro.org
2019-08-02 17:18:16 +01:00
..
arch_dump.c
arm_ldst.h
arm-powerctl.c
arm-powerctl.h
arm-semi.c semihosting: split console_out into string and char versions 2019-06-12 17:53:22 +01:00
cpu64.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
cpu-param.h tcg: Split out target/arch/cpu-param.h 2019-06-10 07:03:34 -07:00
cpu-qom.h
cpu.c target/arm: Avoid bogus NSACR traps on M-profile without Security Extension 2019-08-02 17:18:16 +01:00
cpu.h target/arm: Restrict semi-hosting to TCG 2019-07-04 17:14:43 +01:00
crypto_helper.c
debug_helper.c target/arm: Move debug routines to debug_helper.c 2019-07-04 17:14:43 +01:00
gdbstub64.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
gdbstub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
helper-a64.c tcg: Introduce set/clear_helper_retaddr 2019-07-14 12:19:00 +02:00
helper-a64.h
helper-sve.h
helper.c target/arm: Add missing break statement for Hypervisor Trap Exception 2019-07-22 14:07:38 +01:00
helper.h
idau.h
internals.h target/arm: Declare some M-profile functions publicly 2019-07-01 17:29:01 +01:00
iwmmxt_helper.c
kvm32.c KVM: Introduce kvm_arch_destroy_vcpu() 2019-06-21 02:29:39 +02:00
kvm64.c KVM: Introduce kvm_arch_destroy_vcpu() 2019-06-21 02:29:39 +02:00
kvm_arm.h
kvm-consts.h
kvm-stub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
kvm.c
m_helper.c target/arm: NS BusFault on vector table fetch escalates to NS HardFault 2019-07-15 14:17:04 +01:00
machine.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
Makefile.objs target/arm/helper: Move M profile routines to m_helper.c 2019-07-04 17:14:43 +01:00
monitor.c qapi: Rename target.json to misc-target.json 2019-07-02 13:37:00 +02:00
neon_helper.c
op_addsub.h
op_helper.c target/arm: Deliver BKPT/BRK exceptions to correct exception level 2019-07-30 17:05:22 +01:00
pauth_helper.c target/arm: Fix output of PAuth Auth 2019-06-13 15:14:03 +01:00
psci.c
sve_helper.c tcg: Introduce set/clear_helper_retaddr 2019-07-14 12:19:00 +02:00
sve.decode
tlb_helper.c target/arm: Move TLB related routines to tlb_helper.c 2019-07-01 17:29:01 +01:00
trace-events
translate-a64.c target/arm: Move CPU state dumping routines to cpu.c 2019-07-01 17:29:00 +01:00
translate-a64.h target/arm: Move vfp_expand_imm() to translate.[ch] 2019-06-17 15:14:19 +01:00
translate-sve.c
translate-vfp.inc.c target/arm: Correct VMOV_imm_dp handling of short vectors 2019-07-04 17:25:30 +01:00
translate.c target/arm: Execute Thumb instructions when their condbits are 0xf 2019-07-04 17:25:30 +01:00
translate.h target/arm: Move CPU state dumping routines to cpu.c 2019-07-01 17:29:00 +01:00
vec_helper.c
vfp_helper.c target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR 2019-07-08 14:11:31 +01:00
vfp-uncond.decode target/arm: Convert VCVTA/VCVTN/VCVTP/VCVTM to decodetree 2019-06-13 15:14:04 +01:00
vfp.decode target/arm: Use vfp_expand_imm() for AArch32 VFP VMOV_imm 2019-06-17 15:14:19 +01:00