History

cxl/pmem: Add "Unlock" security command support

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.

Dave Jiang committed 3 years ago

Commit 2bb692f1 parent 410926e4 files · +30 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/cxl_mem.h+1−0
@@ -45,6 +45,7 @@ · 44 unmodified lines
45 ___C(SET_PASSPHRASE, "Set Passphrase"), \45 ___C(SET_PASSPHRASE, "Set Passphrase"), \
46 ___C(DISABLE_PASSPHRASE, "Disable Passphrase"), \46 ___C(DISABLE_PASSPHRASE, "Disable Passphrase"), \
47 ___C(FREEZE_SECURITY, "Freeze Security"), \47 ___C(FREEZE_SECURITY, "Freeze Security"), \
48 ___C(UNLOCK, "Unlock"), \
48 ___C(MAX, "invalid / last command")49 ___C(MAX, "invalid / last command")
49 50
50#define ___C(a, b) CXL_MEM_COMMAND_ID_##a51#define ___C(a, b) CXL_MEM_COMMAND_ID_##a