similarity index 100%
rename from arch/x86/kernel/cpu/sgx/arch.h
rename to arch/x86/include/asm/sgx_arch.h
@@ -10,7 +10,7 @@
#include <linux/sched.h>
#include <linux/workqueue.h>
#include <uapi/asm/sgx.h>
-#include "../arch.h"
+#include <asm/sgx_arch.h>
#include "../encl.h"
#include "../encls.h"
#include "../sgx.h"
@@ -7,7 +7,7 @@
#include <linux/shmem_fs.h>
#include <linux/suspend.h>
#include <linux/sched/mm.h>
-#include "arch.h"
+#include <asm/sgx_arch.h>
#include "encl.h"
#include "encls.h"
#include "sgx.h"
@@ -8,7 +8,7 @@
#include <linux/rwsem.h>
#include <linux/types.h>
#include <asm/asm.h>
-#include "arch.h"
+#include <asm/sgx_arch.h>
/**
* ENCLS_FAULT_FLAG - flag signifying an ENCLS return code is a trapnr
@@ -10,8 +10,8 @@
#include <linux/ratelimit.h>
#include <linux/sched/signal.h>
#include <linux/slab.h>
+#include <asm/sgx_arch.h>
#include "driver/driver.h"
-#include "arch.h"
#include "encls.h"
#include "sgx.h"
#include "virt.h"
@@ -8,10 +8,9 @@
#include <linux/rwsem.h>
#include <linux/types.h>
#include <asm/asm.h>
+#include <asm/sgx_arch.h>
#include <uapi/asm/sgx_errno.h>
-#include "arch.h"
-
struct sgx_epc_page {
unsigned long desc;
struct sgx_encl_page *owner;
@@ -33,7 +33,7 @@ typedef uint64_t u64;
(((~0ULL) - (1ULL << (l)) + 1) & \
(~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))
-#include "../../../../../arch/x86/kernel/cpu/sgx/arch.h"
+#include "../../../../../arch/x86/include/asm/sgx_arch.h"
#include "../../../../../arch/x86/include/uapi/asm/sgx.h"
#endif /* TYPES_H */
KVM will use many of the architectural constants and structs to virtualize SGX. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> --- arch/x86/{kernel/cpu/sgx/arch.h => include/asm/sgx_arch.h} | 0 arch/x86/kernel/cpu/sgx/driver/driver.h | 2 +- arch/x86/kernel/cpu/sgx/encl.c | 2 +- arch/x86/kernel/cpu/sgx/encls.h | 2 +- arch/x86/kernel/cpu/sgx/main.c | 2 +- arch/x86/kernel/cpu/sgx/sgx.h | 3 +-- tools/testing/selftests/x86/sgx/defines.h | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) rename arch/x86/{kernel/cpu/sgx/arch.h => include/asm/sgx_arch.h} (100%)