qemu/target/xtensa
Peter Maydell ad18376b90 target/xtensa: Assert that interrupt level is within bounds
In handle_interrupt() we use level as an index into the interrupt_vector[]
array. This is safe because we have checked it against env->config->nlevel,
but Coverity can't see that (and it is only true because each CPU config
sets its XCHAL_NUM_INTLEVELS to something less than MAX_NLEVELS), so it
complains about a possible array overrun (CID 1507131)

Add an assert() which will make Coverity happy and catch the unlikely
case of a mis-set XCHAL_NUM_INTLEVELS in future.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Message-id: 20230623154135.1930261-1-peter.maydell@linaro.org
2023-07-06 13:26:43 +01:00
..
core-dc232b meson: rename included C source files to .c.inc 2020-08-21 06:18:30 -04:00
core-dc233c meson: rename included C source files to .c.inc 2020-08-21 06:18:30 -04:00
core-de212 meson: rename included C source files to .c.inc 2020-08-21 06:18:30 -04:00
core-de233_fpu Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
core-dsp3400 Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
core-fsf meson: rename included C source files to .c.inc 2020-08-21 06:18:30 -04:00
core-lx106 target/xtensa: import core lx106 2022-05-06 15:27:40 -07:00
core-sample_controller meson: rename included C source files to .c.inc 2020-08-21 06:18:30 -04:00
core-test_kc705_be meson: rename included C source files to .c.inc 2020-08-21 06:18:30 -04:00
core-test_mmuhifi_c3 meson: rename included C source files to .c.inc 2020-08-21 06:18:30 -04:00
core-dc232b.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-dc233c.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-de212.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-de233_fpu.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-dsp3400.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-fsf.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-lx106.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-sample_controller.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-test_kc705_be.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-test_mmuhifi_c3.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
cores.list target/xtensa: import core lx106 2022-05-06 15:27:40 -07:00
cpu-param.h target/xtensa: Remove NB_MMU_MODES define 2023-03-13 06:44:37 -07:00
cpu-qom.h target/xtensa: Convert to 3-phase reset 2022-12-16 15:58:16 +00:00
cpu.c target/xtensa/cpu: Include missing "memory.h" header 2023-02-27 22:29:01 +01:00
cpu.h target: Widen pc/cs_base in cpu_get_tb_cpu_state 2023-06-26 17:32:59 +02:00
dbg_helper.c exec/exec-all: Move 'qemu/log.h' include in units requiring it 2022-02-21 10:18:06 +01:00
exc_helper.c target/xtensa: Assert that interrupt level is within bounds 2023-07-06 13:26:43 +01:00
fpu_helper.c exec/exec-all: Move 'qemu/log.h' include in units requiring it 2022-02-21 10:18:06 +01:00
gdbstub.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
helper.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
helper.h target/xtensa: implement FPU division and square root 2020-08-21 12:48:15 -07:00
import_core.sh gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
Kconfig meson: Introduce target-specific Kconfig 2021-07-09 18:21:34 +02:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
mmu_helper.c exec/exec-all: Move 'qemu/log.h' include in units requiring it 2022-02-21 10:18:06 +01:00
monitor.c hmp: Pass monitor to mon_get_cpu_env() 2020-11-13 12:45:51 +00:00
op_helper.c target/xtensa: add clock input to xtensa CPU 2022-05-06 15:27:40 -07:00
overlay_tool.h Replace TARGET_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
translate.c accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
win_helper.c exec/exec-all: Move 'qemu/log.h' include in units requiring it 2022-02-21 10:18:06 +01:00
xtensa-isa-internal.h
xtensa-isa.c
xtensa-isa.h
xtensa-semi.c target/xtensa/xtensa-semi: Fix compilation problem on Haiku 2021-07-09 18:42:46 +02:00