hw/ufs: Support MCQ runtime registers and Task Management Requests
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 1 replyIn review
- v33 patches 4 repliesSuperseded
- v23 patches 6 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 3 patches | 0 replies | Superseded |
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | hw/ufs: Track SCSIRequest and cancel pending requests in ufs_clear_reqhw/ hw/ hw/ | +15 | 0 replies | |
| 2/4 | hw/ufs: Support MCQ runtime interrupt and queue status registershw/ hw/ include/ | +126 | 0 replies | |
| 3/4 | hw/ufs: Implement Task Management Request (TMR) handlinghw/ hw/ include/ | +134 | 0 replies | |
| 4/4 | hw/ufs: Skip nullified MCQ submission queue entries with OCS_ABORTEDhw/ include/ | +17 | 0 replies |
Reviews trailers per patch
None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Jeuk Kim |
|---|---|
| Series | R-b |
| 1/4 | |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/4] hw/ufs: Support MCQ runtime registers and Task Management Requests
This series adds support for Task Management Requests (TMR) and Multi-Circular Queue (MCQ) runtime status, interrupt, and queue cleanup operations in the QEMU UFS emulator.
Why:
Linux UFS error recovery issues Task Management Requests (TMR) via the UTP Task Management Request List (UTMRL). In MCQ mode, the driver also uses per-queue operational registers (SQnRTC, SQnRTS, SQnCTI, CQnIS) to stop queues and clean up aborted tasks, and nullifies unfetched SQEs by setting Command Type to 0xF. QEMU does not yet model these paths or track per-request SCSIRequest pointers needed to cancel individual in-flight commands. Per-SQ interrupt status/enable bits (SQIS.SSS/SUS, SQIE, and IS.SQES) remain unmodeled.
What:
- Patch 1: Track SCSIRequest in UfsRequest and cancel it in ufs_clear_req().
- Patch 2: Implement MCQ runtime operational registers and SQnRTC.ICU cleanup.
- Patch 3: Implement UTMRL doorbell and TMR handling (QUERY_TASK and ABORT_TASK).
- Patch 4: Skip nullified MCQ SQEs (CT = 0xF) and post CQEs with UFS_OCS_ABORTED.
Differences from v3:
- Report SQRTS.RTC (0..3) and preserve SQRTS.CUS across SQ_START (Jeuk)
- Separate TMR rsp_header.response from output_param1 and gate IS.UTMRCS on the UTMRD I-bit (Jeuk)
- Drop non-spec MMIO configuration register resets in ufs_hce_reset()
- Complete nullified MCQ SQEs (CT = 0xF) with UFS_OCS_ABORTED
Tested:
Verified on QEMU ARM64 with qos-test and Linux guest MCQ TMR abort, SQ cleanup, and host reset.
Stanley Jhu (4):
hw/ufs: Track SCSIRequest and cancel pending requests in ufs_clear_req hw/ufs: Support MCQ runtime interrupt and queue status registers hw/ufs: Implement Task Management Request (TMR) handling hw/ufs: Skip nullified MCQ submission queue entries with OCS_ABORTED
hw/ufs/lu.c | 8 ++ hw/ufs/trace-events | 2 + hw/ufs/ufs.c | 268 +++++++++++++++++++++++++++++++++++++++++++- hw/ufs/ufs.h | 1 + include/block/ufs.h | 17 +++ 5 files changed, 292 insertions(+), 4 deletions(-)
Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog