qemu/hw/timer
Zheyu Ma ff8aff01fa hw/timer/a9gtimer: Handle QTest mode in a9_gtimer_get_current_cpu
This commit updates the a9_gtimer_get_current_cpu() function to handle
cases where QTest is enabled. When QTest is used, it returns 0 instead
of dereferencing the current_cpu, which can be NULL. This prevents the
program from crashing during QTest runs.

Reproducer:
cat << EOF | qemu-system-aarch64 -display \
none -machine accel=qtest, -m 512M -machine npcm750-evb -qtest stdio
writel 0xf03fe20c 0x26d7468c
EOF

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240618144009.3137806-1-zheyuma97@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2024-06-21 14:01:59 +01:00
..
a9gtimer.c hw/timer/a9gtimer: Handle QTest mode in a9_gtimer_get_current_cpu 2024-06-21 14:01:59 +01:00
allwinner-a10-pit.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
arm_mptimer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
arm_timer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
armv7m_systick.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
aspeed_timer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
avr_timer16.c
bcm2835_systmr.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
cadence_ttc.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
cmsdk-apb-dualtimer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
cmsdk-apb-timer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
digic-timer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
etraxfs_timer.c hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
exynos4210_mct.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
exynos4210_pwm.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
grlib_gptimer.c hw/sparc/grlib: split out the headers for each peripherals 2024-02-15 16:58:46 +01:00
hpet.c hw/timer: Move HPET_INTCAP definition to "hpet.h" 2024-02-20 20:34:21 +03:00
i8254_common.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
i8254.c hw/timer/i8254_common: Share "iobase" property via base class 2023-06-05 07:43:23 +01:00
ibex_timer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
imx_epit.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
imx_gpt.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
Kconfig hw/timer: Remove the ALTERA_TIMER model 2024-04-24 16:03:38 +02:00
meson.build hw/timer: Remove the ALTERA_TIMER model 2024-04-24 16:03:38 +02:00
mips_gictimer.c
mss-timer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
npcm7xx_timer.c hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
nrf51_timer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
omap_gptimer.c
omap_synctimer.c
pxa2xx_timer.c misc: pxa2xx_timer: replace qemu_system_reset_request() call with watchdog_perform_action() 2024-02-27 13:01:41 +00:00
renesas_cmt.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
renesas_tmr.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
sh_timer.c
sifive_pwm.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
slavio_timer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
sse-counter.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
sse-timer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
stellaris-gptm.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
stm32f2xx_timer.c hw/timer: Constify VMState 2023-12-30 07:38:06 +11:00
trace-events hw/timer/hpet: Convert DPRINTF to trace events 2024-01-19 12:28:10 +01:00
trace.h
xilinx_timer.c