[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/36] target/arm: Fix VNCR fault detection logic
From: |
Peter Maydell |
Subject: |
[PULL 02/36] target/arm: Fix VNCR fault detection logic |
Date: |
Fri, 26 Jan 2024 14:33:07 +0000 |
In arm_deliver_fault() we check for whether the fault is caused
by a data abort due to an access to a FEAT_NV2 sysreg in the
memory pointed to by the VNCR. Unfortunately part of the
condition checks the wrong argument to the function, meaning
that it would spuriously trigger, resulting in some instruction
aborts being taken to the wrong EL and reported incorrectly.
Use the right variable in the condition.
Fixes: 674e5345275d425 ("target/arm: Report VNCR_EL2 based faults correctly")
Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-id: 20240116165605.2523055-1-peter.maydell@linaro.org
---
target/arm/tcg/tlb_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/tcg/tlb_helper.c b/target/arm/tcg/tlb_helper.c
index dd5de74ffb7..5477c7fb7dc 100644
--- a/target/arm/tcg/tlb_helper.c
+++ b/target/arm/tcg/tlb_helper.c
@@ -184,7 +184,7 @@ void arm_deliver_fault(ARMCPU *cpu, vaddr addr,
* (and indeed syndrome does not have the EC field in it,
* because we masked that out in disas_set_insn_syndrome())
*/
- bool is_vncr = (mmu_idx != MMU_INST_FETCH) &&
+ bool is_vncr = (access_type != MMU_INST_FETCH) &&
(env->exception.syndrome & ARM_EL_VNCR);
if (is_vncr) {
--
2.34.1
- [PULL 00/36] target-arm queue, Peter Maydell, 2024/01/26
- [PULL 01/36] target/xtensa: fix OOB TLB entry access, Peter Maydell, 2024/01/26
- [PULL 05/36] hw/arm/allwinner-a10: Unconditionally map the USB Host controllers, Peter Maydell, 2024/01/26
- [PULL 07/36] hw/arm: Add EHCI/OHCI controllers to Allwinner R40 and Bananapi board, Peter Maydell, 2024/01/26
- [PULL 09/36] hw/arm: Add watchdog timer to Allwinner H40 and Bananapi board, Peter Maydell, 2024/01/26
- [PULL 02/36] target/arm: Fix VNCR fault detection logic,
Peter Maydell <=
- [PULL 03/36] hw/arm/virt.c: Remove newline from error_report() string, Peter Maydell, 2024/01/26
- [PULL 06/36] hw/arm/nseries: Unconditionally map the TUSB6010 USB Host controller, Peter Maydell, 2024/01/26
- [PULL 10/36] hw/arm/exynos4210: Include missing 'exec/tswap.h' header, Peter Maydell, 2024/01/26
- [PULL 11/36] hw/arm/xilinx_zynq: Include missing 'exec/tswap.h' header, Peter Maydell, 2024/01/26
- [PULL 13/36] hw/arm/xlnx-versal: Include missing 'cpu.h' header, Peter Maydell, 2024/01/26
- [PULL 15/36] target/arm/cpregs: Include missing 'hw/registerfields.h' header, Peter Maydell, 2024/01/26
- [PULL 04/36] hw/arm/musicpal: Convert to qemu_add_kbd_event_handler(), Peter Maydell, 2024/01/26
- [PULL 12/36] hw/arm/smmuv3: Include missing 'hw/registerfields.h' header, Peter Maydell, 2024/01/26
- [PULL 08/36] hw/arm: Add AHCI/SATA controller to Allwinner R40 and Bananapi board, Peter Maydell, 2024/01/26
- [PULL 20/36] target/arm: Declare ARM_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h', Peter Maydell, 2024/01/26