On 12/22/2025 9:35 PM, Ilia Levi wrote:
> Currently the completion queue processing routine in UFS does not check
> whether there is available space. This can cause CQ entries to be discarded
> and overwritten. This series include a fix for the issue based on how NVMe
> processes completions. It also includes a test to illustrate the issue.
>
> Before applying the fix, the test will fail with:
> ERROR:../tests/qtest/ufs-test.c:801:ufstest_mcq_cq_wraparound:
> assertion failed (completed == num_requests): (0 == 32)
>
> Ilia Levi (2):
> hw/ufs: Fix mcq completion queue wraparound
> tests/qtest/ufs-test: Add test for mcq completion queue wraparound
>
> hw/ufs/ufs.c | 20 ++++++-
> hw/ufs/ufs.h | 9 +++
> tests/qtest/ufs-test.c | 125 +++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 153 insertions(+), 1 deletion(-)
Hi Ilia,
Sorry for the late reply. Thanks a lot for the fix and the test.
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>