[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1622537274-146420-2-git-send-email-robert.hu@linux.intel.com>
Date: Tue, 1 Jun 2021 16:47:40 +0800
From: Robert Hoo <robert.hu@...ux.intel.com>
To: pbonzini@...hat.com, seanjc@...gle.com, vkuznets@...hat.com,
wanpengli@...cent.com, jmattson@...gle.com, joro@...tes.org,
kvm@...r.kernel.org
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
chang.seok.bae@...el.com, robert.hu@...el.com,
robert.hu@...ux.intel.com
Subject: [PATCH 01/15] x86/keylocker: Move KEYSRC_{SW,HW}RAND to keylocker.h
KVM needs the KEYSRC_SWRAND and KEYSRC_HWRAND macro definitions.
Move them to <asm/keylocker.h>
Signed-off-by: Robert Hoo <robert.hu@...ux.intel.com>
Reviewed-by: Tony Luck <tony.luck@...el.com>
Cc: x86@...nel.org
Cc: linux-kernel@...r.kernel.org
---
arch/x86/include/asm/keylocker.h | 3 +++
arch/x86/kernel/keylocker.c | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/keylocker.h b/arch/x86/include/asm/keylocker.h
index 74b8063..9836e68 100644
--- a/arch/x86/include/asm/keylocker.h
+++ b/arch/x86/include/asm/keylocker.h
@@ -9,6 +9,9 @@
#include <linux/bits.h>
#include <asm/msr.h>
+#define KEYSRC_SWRAND 0
+#define KEYSRC_HWRAND BIT(1)
+
#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 5a784492..17bb2e8 100644
--- a/arch/x86/kernel/keylocker.c
+++ b/arch/x86/kernel/keylocker.c
@@ -66,8 +66,6 @@ void flush_keylocker_data(void)
keydata.valid = false;
}
-#define KEYSRC_SWRAND 0
-#define KEYSRC_HWRAND BIT(1)
#define KEYSRC_HWRAND_RETRY 10
/**
--
1.8.3.1
Powered by blists - more mailing lists