Create callback function to support the nvdimm_security_ops() ->unlock() callback. Translate the operation to send "Unlock" security command for CXL mem device. When the mem device is unlocked, cpu_cache_invalidate_memregion() is called in order to invalidate all CPU caches before attempting to access the mem device. See CXL rev3.0 spec section 8.2.9.8.6.4 for reference.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -45,6 +45,7 @@ · 44 unmodified lines | ||
| 45 | 45 | ___C(SET_PASSPHRASE, "Set Passphrase"), \ |
| 46 | 46 | ___C(DISABLE_PASSPHRASE, "Disable Passphrase"), \ |
| 47 | 47 | ___C(FREEZE_SECURITY, "Freeze Security"), \ |
| 48 | + ___C(UNLOCK, "Unlock"), \ | |
| 48 | 49 | ___C(MAX, "invalid / last command") |
| 49 | 50 | |
| 50 | 51 | #define ___C(a, b) CXL_MEM_COMMAND_ID_##a |