qemu/hw/ufs
Jeuk Kim 50475f1511 hw/ufs: Fix mcq register range check logic
The function ufs_is_mcq_reg() and ufs_is_mcq_op_reg() only evaluated
the range of the mcq_reg and mcq_op_reg offset, which is defined as
a constant. Therefore, it was possible for them to return true
even though the ufs device is configured to not support the mcq.
This could cause ufs_mmio_read()/ufs_mmio_write() to result in
Null-pointer-dereference.
So fix it.

Resolves: #2428
Fixes: 5c079578d2 ("hw/ufs: Add support MCQ of UFSHCI 4.0")
Reported-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
2024-07-14 17:11:21 +09:00
..
Kconfig
lu.c hw/ufs: Modify lu.c to share codes with SCSI subsystem 2023-10-30 10:28:04 +09:00
meson.build hw/ufs: Support for UFS logical unit 2023-09-07 14:01:29 -04:00
trace-events hw/ufs: Add support MCQ of UFSHCI 4.0 2024-06-03 16:20:42 +09:00
trace.h
ufs.c hw/ufs: Fix mcq register range check logic 2024-07-14 17:11:21 +09:00
ufs.h hw/ufs: Add support MCQ of UFSHCI 4.0 2024-06-03 16:20:42 +09:00