[RFC PATCH 3/8] x86/msr-index: Add MSRs for Key Locker internal key

From: Chang S. Bae
Date: Wed Dec 16 2020 - 12:47:25 EST


Key Locker internal key in a CPU state can be backed up in a platform
register. The backup can be also copied back to a CPU state. This mechanism
is useful to restore the key (after system sleep).

Add MSRs for the internal key backup, copy, and status check.

Signed-off-by: Chang S. Bae <chang.seok.bae@xxxxxxxxx>
Cc: x86@xxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
arch/x86/include/asm/msr-index.h | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index 972a34d93505..c0b9157806f7 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -922,4 +922,10 @@
#define MSR_VM_IGNNE 0xc0010115
#define MSR_VM_HSAVE_PA 0xc0010117

+/* MSRs for Key Locker Internal (Wrapping) Key management */
+#define MSR_IA32_COPY_LOCAL_TO_PLATFORM 0x00000d91
+#define MSR_IA32_COPY_PLATFORM_TO_LOCAL 0x00000d92
+#define MSR_IA32_COPY_STATUS 0x00000990
+#define MSR_IA32_IWKEYBACKUP_STATUS 0x00000991
+
#endif /* _ASM_X86_MSR_INDEX_H */
--
2.17.1