diff mbox series

[RFC,01/12] x86/keylocker: Move LOADIWKEY opcode definition from keylocker.c to keylocker.h

Message ID 1611565580-47718-2-git-send-email-robert.hu@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series KVM: Support Intel KeyLocker | expand

Commit Message

Robert Hoo Jan. 25, 2021, 9:06 a.m. UTC
For later kvm part code easy referrence.

Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
---
 arch/x86/include/asm/keylocker.h | 2 ++
 arch/x86/kernel/keylocker.c      | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/x86/include/asm/keylocker.h b/arch/x86/include/asm/keylocker.h
index a6774ce..8c0792f 100644
--- a/arch/x86/include/asm/keylocker.h
+++ b/arch/x86/include/asm/keylocker.h
@@ -8,6 +8,8 @@ 
 #include <linux/bits.h>
 #include <asm/msr.h>
 
+#define LOADIWKEY		".byte 0xf3,0x0f,0x38,0xdc,0xd1"
+
 #define KEYLOCKER_CPUID                0x019
 #define KEYLOCKER_CPUID_EAX_SUPERVISOR BIT(0)
 #define KEYLOCKER_CPUID_EBX_AESKLE     BIT(0)
diff --git a/arch/x86/kernel/keylocker.c b/arch/x86/kernel/keylocker.c
index e77e4c3..06a30f0 100644
--- a/arch/x86/kernel/keylocker.c
+++ b/arch/x86/kernel/keylocker.c
@@ -40,7 +40,6 @@  bool check_keylocker_readiness(void)
 }
 
 /* Load Internal (Wrapping) Key */
-#define LOADIWKEY		".byte 0xf3,0x0f,0x38,0xdc,0xd1"
 #define LOADIWKEY_NUM_OPERANDS	3
 #define LOADIWKEY_HWRAND_RETRY	10