aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/virt.c
diff options
context:
space:
mode:
authorZheyu Ma <zheyuma97@gmail.com>2024-06-18 15:56:10 +0200
committerPeter Maydell <peter.maydell@linaro.org>2024-06-21 14:01:59 +0100
commit813b59e8b8ab5d284672e0bbd79173df2e25e01d (patch)
treedd4fd91a040b15e5d94c9fa36bd627e531284e8a /hw/arm/virt.c
parentff8aff01fa20c4fd5bbe46e1d25fbefdf996ef73 (diff)
downloadqemu-813b59e8b8ab5d284672e0bbd79173df2e25e01d.zip
qemu-813b59e8b8ab5d284672e0bbd79173df2e25e01d.tar.gz
qemu-813b59e8b8ab5d284672e0bbd79173df2e25e01d.tar.bz2
hw/usb/hcd-dwc2: Handle invalid address access in read and write functions
This commit modifies the dwc2_hsotg_read() and dwc2_hsotg_write() functions to handle invalid address access gracefully. Instead of using g_assert_not_reached(), which causes the program to abort, the functions now log an error message and return a default value for reads or do nothing for writes. This change prevents the program from aborting and provides clear log messages indicating when an invalid memory address is accessed. Reproducer: cat << EOF | qemu-system-aarch64 -display none \ -machine accel=qtest, -m 512M -machine raspi2b -m 1G -nodefaults \ -usb -drive file=null-co://,if=none,format=raw,id=disk0 -device \ usb-storage,port=1,drive=disk0 -qtest stdio readl 0x3f980dfb EOF Signed-off-by: Zheyu Ma <zheyuma97@gmail.com> Reviewed-by: Paul Zimmerman <pauldzim@gmail.com> Message-id: 20240618135610.3109175-1-zheyuma97@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/virt.c')
0 files changed, 0 insertions, 0 deletions