hw/ufs: Add RPMB well-known logical unit emulation
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | include/scsi, block/ufs: Add security protocol and RPMB definitionsinclude/ include/ | +57 | 0 replies | |
| 2/7 | hw/ufs: Add RPMB unit descriptor and SECURITY PROTOCOL IN/OUT dispatchhw/ hw/ hw/ +3 more | +250 | 0 replies | |
| 3/7 | tests/qtest/ufs-test: Add RPMB descriptor and CDB validation testtests/ | +285 | 0 replies | |
| 4/7 | hw/ufs: Add RPMB key programming and write counter read handlinghw/ | +63 | 0 replies | |
| 5/7 | tests/qtest/ufs-test: Add RPMB key programming and write counter testtests/ | +105 | 0 replies | |
| 6/7 | hw/ufs: Add RPMB authenticated data write and read handlingdocs/ hw/ hw/ | +223 | 0 replies | |
| 7/7 | tests/qtest/ufs-test: Add RPMB authenticated data read and write testtests/ | +569 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/7] hw/ufs: Add RPMB well-known logical unit emulation
This series implements RPMB (Replay Protected Memory Block) well-known logical unit emulation (W-LUN 0xc4) for QEMU UFS per JESD220H Section 12.4.
Summary of Changes:
- Patch 1: Add SCSI security protocol opcodes and RPMB definitions.
- Patch 2: Set bSecurityLU to 0x01, enable RPMB unit descriptor, wire SECURITY PROTOCOL IN/OUT CDB and PRDT buffer capacity validation via ufs_fit_data_buffer(), add Result Register read handling in hw/ufs/rpmb.c, and clear volatile RPMB state in ufs_hce_reset().
- Patch 3: Add qtest case for DeviceDescriptor bSecurityLU, RPMB unit descriptor, CDB, W-LUN dispatch, and PRDT validation.
- Patch 4: Add HMAC-SHA256 key programming and write counter read handling.
- Patch 5: Add qtest case for key programming and write counter reads.
- Patch 6: Add single- and multi-frame authenticated data write and read handling and update docs/system/devices/ufs.rst.
- Patch 7: Add qtest case for authenticated data writes, reads, check ordering, general-failure paths, multi-region isolation, and HCE reset state handling.
Outside hw/ufs and tests, the series only adds the SECURITY PROTOCOL IN/OUT opcodes to include/scsi/constants.h and RPMB definitions to the UFS-only include/block/ufs.h. There is no change to block layer or SCSI core code.
Tested: QEMU ARM64/x86_64 qos-test and Linux guest SDB/MCQ RPMB, pass.
Based-on: <[email protected]>
Stanley Jhu (7):
include/scsi, block/ufs: Add security protocol and RPMB definitions hw/ufs: Add RPMB unit descriptor and SECURITY PROTOCOL IN/OUT dispatch tests/qtest/ufs-test: Add RPMB descriptor and CDB validation test hw/ufs: Add RPMB key programming and write counter read handling tests/qtest/ufs-test: Add RPMB key programming and write counter test hw/ufs: Add RPMB authenticated data write and read handling tests/qtest/ufs-test: Add RPMB authenticated data read and write test
docs/system/devices/ufs.rst | 6 +- hw/ufs/lu.c | 34 ++ hw/ufs/meson.build | 2 +- hw/ufs/rpmb.c | 447 +++++++++++++++++ hw/ufs/trace-events | 3 + hw/ufs/ufs.c | 26 +- hw/ufs/ufs.h | 24 + include/block/ufs.h | 58 ++- include/scsi/constants.h | 2 + tests/qtest/ufs-test.c | 959 ++++++++++++++++++++++++++++++++++++ 10 files changed, 1552 insertions(+), 9 deletions(-) create mode 100644 hw/ufs/rpmb.c
Signature · 1 line
2.56.0.307.g5fe7bd680c-goog