diff mbox

[intel-sgx-kernel-dev,1/2] intel_sgx: move files to arch/x86/kernel/cpu

Message ID 1504029396-3353-2-git-send-email-sean.j.christopherson@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sean Christopherson Aug. 29, 2017, 5:56 p.m. UTC
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/Kconfig                                     | 20 ++++++++++++++++++++
 arch/x86/kernel/cpu/Makefile                         |  1 +
 .../x86 => arch/x86/kernel/cpu}/intel_sgx/Makefile   |  0
 .../x86 => arch/x86/kernel/cpu}/intel_sgx/sgx.h      |  0
 .../x86/kernel/cpu}/intel_sgx/sgx_ioctl.c            |  0
 .../x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_main.c |  0
 .../x86/kernel/cpu}/intel_sgx/sgx_page_cache.c       |  0
 .../x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_util.c |  0
 .../x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_vma.c  |  0
 drivers/platform/x86/Kconfig                         |  2 --
 drivers/platform/x86/Makefile                        |  1 -
 drivers/platform/x86/intel_sgx/Kconfig               | 19 -------------------
 12 files changed, 21 insertions(+), 22 deletions(-)
 rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/Makefile (100%)
 rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx.h (100%)
 rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_ioctl.c (100%)
 rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_main.c (100%)
 rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_page_cache.c (100%)
 rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_util.c (100%)
 rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_vma.c (100%)
 delete mode 100644 drivers/platform/x86/intel_sgx/Kconfig

Comments

Jarkko Sakkinen Aug. 30, 2017, 6:45 p.m. UTC | #1
I'll do a more proper review to explain my view.

On Tue, Aug 29, 2017 at 10:56:35AM -0700, Sean Christopherson wrote:
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

The commit message is missing.

/Jarkko

> ---
>  arch/x86/Kconfig                                     | 20 ++++++++++++++++++++
>  arch/x86/kernel/cpu/Makefile                         |  1 +
>  .../x86 => arch/x86/kernel/cpu}/intel_sgx/Makefile   |  0
>  .../x86 => arch/x86/kernel/cpu}/intel_sgx/sgx.h      |  0
>  .../x86/kernel/cpu}/intel_sgx/sgx_ioctl.c            |  0
>  .../x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_main.c |  0
>  .../x86/kernel/cpu}/intel_sgx/sgx_page_cache.c       |  0
>  .../x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_util.c |  0
>  .../x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_vma.c  |  0
>  drivers/platform/x86/Kconfig                         |  2 --
>  drivers/platform/x86/Makefile                        |  1 -
>  drivers/platform/x86/intel_sgx/Kconfig               | 19 -------------------
>  12 files changed, 21 insertions(+), 22 deletions(-)
>  rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/Makefile (100%)
>  rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx.h (100%)
>  rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_ioctl.c (100%)
>  rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_main.c (100%)
>  rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_page_cache.c (100%)
>  rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_util.c (100%)
>  rename {drivers/platform/x86 => arch/x86/kernel/cpu}/intel_sgx/sgx_vma.c (100%)
>  delete mode 100644 drivers/platform/x86/intel_sgx/Kconfig
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 0efb4c9..fb8c91f 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1787,6 +1787,26 @@ config X86_INTEL_MEMORY_PROTECTION_KEYS
>  
>  	  If unsure, say y.
>  
> +config INTEL_SGX
> +	tristate "Intel(R) SGX Driver"
> +	default n
> +	depends on X86
> +	select MMU_NOTIFIER
> +	---help---
> +	  Intel(R) SGX is a set of CPU instructions that can be used by
> +	  applications to set aside private regions of code and data.  The
> +	  code outside the enclave is disallowed to access the memory inside
> +	  the enclave by the CPU access control.
> +
> +	  The firmware uses PRMRR registers to reserve an area of physical
> +	  memory called Enclave Page Cache (EPC). There is a hardware unit in
> +	  the processor called Memory Encryption Engine. The MEE encrypts and
> +	  decrypts the EPC pages as they enter and leave the processor package.
> +
> +	  For details, see Documentation/x86/intel_sgx.rst
> +
> +	  If unsure, say N.
> +
>  config EFI
>  	bool "EFI runtime service support"
>  	depends on ACPI
> diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
> index 5200001..490fd60 100644
> --- a/arch/x86/kernel/cpu/Makefile
> +++ b/arch/x86/kernel/cpu/Makefile
> @@ -34,6 +34,7 @@ obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
>  
>  obj-$(CONFIG_INTEL_RDT_A)	+= intel_rdt.o intel_rdt_rdtgroup.o intel_rdt_schemata.o
>  
> +obj-$(CONFIG_INTEL_SGX)			+= intel_sgx/
>  obj-$(CONFIG_X86_MCE)			+= mcheck/
>  obj-$(CONFIG_MTRR)			+= mtrr/
>  obj-$(CONFIG_MICROCODE)			+= microcode/
> diff --git a/drivers/platform/x86/intel_sgx/Makefile b/arch/x86/kernel/cpu/intel_sgx/Makefile
> similarity index 100%
> rename from drivers/platform/x86/intel_sgx/Makefile
> rename to arch/x86/kernel/cpu/intel_sgx/Makefile
> diff --git a/drivers/platform/x86/intel_sgx/sgx.h b/arch/x86/kernel/cpu/intel_sgx/sgx.h
> similarity index 100%
> rename from drivers/platform/x86/intel_sgx/sgx.h
> rename to arch/x86/kernel/cpu/intel_sgx/sgx.h
> diff --git a/drivers/platform/x86/intel_sgx/sgx_ioctl.c b/arch/x86/kernel/cpu/intel_sgx/sgx_ioctl.c
> similarity index 100%
> rename from drivers/platform/x86/intel_sgx/sgx_ioctl.c
> rename to arch/x86/kernel/cpu/intel_sgx/sgx_ioctl.c
> diff --git a/drivers/platform/x86/intel_sgx/sgx_main.c b/arch/x86/kernel/cpu/intel_sgx/sgx_main.c
> similarity index 100%
> rename from drivers/platform/x86/intel_sgx/sgx_main.c
> rename to arch/x86/kernel/cpu/intel_sgx/sgx_main.c
> diff --git a/drivers/platform/x86/intel_sgx/sgx_page_cache.c b/arch/x86/kernel/cpu/intel_sgx/sgx_page_cache.c
> similarity index 100%
> rename from drivers/platform/x86/intel_sgx/sgx_page_cache.c
> rename to arch/x86/kernel/cpu/intel_sgx/sgx_page_cache.c
> diff --git a/drivers/platform/x86/intel_sgx/sgx_util.c b/arch/x86/kernel/cpu/intel_sgx/sgx_util.c
> similarity index 100%
> rename from drivers/platform/x86/intel_sgx/sgx_util.c
> rename to arch/x86/kernel/cpu/intel_sgx/sgx_util.c
> diff --git a/drivers/platform/x86/intel_sgx/sgx_vma.c b/arch/x86/kernel/cpu/intel_sgx/sgx_vma.c
> similarity index 100%
> rename from drivers/platform/x86/intel_sgx/sgx_vma.c
> rename to arch/x86/kernel/cpu/intel_sgx/sgx_vma.c
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index 6c217ac..8489020 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -1110,8 +1110,6 @@ config SILEAD_DMI
>  	  with the OS-image for the device. This option supplies the missing
>  	  information. Enable this for x86 tablets with Silead touchscreens.
>  
> -source "drivers/platform/x86/intel_sgx/Kconfig"
> -
>  endif # X86_PLATFORM_DEVICES
>  
>  config PMC_ATOM
> diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
> index aec6e53..182a3ed 100644
> --- a/drivers/platform/x86/Makefile
> +++ b/drivers/platform/x86/Makefile
> @@ -80,4 +80,3 @@ obj-$(CONFIG_PMC_ATOM)		+= pmc_atom.o
>  obj-$(CONFIG_MLX_PLATFORM)	+= mlx-platform.o
>  obj-$(CONFIG_MLX_CPLD_PLATFORM)	+= mlxcpld-hotplug.o
>  obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o
> -obj-$(CONFIG_INTEL_SGX) += intel_sgx/
> diff --git a/drivers/platform/x86/intel_sgx/Kconfig b/drivers/platform/x86/intel_sgx/Kconfig
> deleted file mode 100644
> index 9641728..0000000
> --- a/drivers/platform/x86/intel_sgx/Kconfig
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -#
> -# Intel SGX
> -#
> -
> -config INTEL_SGX
> -	tristate "Intel(R) SGX Driver"
> -	default n
> -	depends on X86
> -	select MMU_NOTIFIER
> -	---help---
> -	Intel(R) SGX is a set of CPU instructions that can be used by
> -	applications to set aside private regions of code and data.  The code
> -	outside the enclave is disallowed to access the memory inside the
> -	enclave by the CPU access control.
> -
> -	The firmware uses PRMRR registers to reserve an area of physical memory
> -	called Enclave Page Cache (EPC). There is a hardware unit in the
> -	processor called Memory Encryption Engine. The MEE encrypts and decrypts
> -	the EPC pages as they enter and leave the processor package.
> -- 
> 2.7.4
> 
> _______________________________________________
> intel-sgx-kernel-dev mailing list
> intel-sgx-kernel-dev@lists.01.org
> https://lists.01.org/mailman/listinfo/intel-sgx-kernel-dev
diff mbox

Patch

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 0efb4c9..fb8c91f 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1787,6 +1787,26 @@  config X86_INTEL_MEMORY_PROTECTION_KEYS
 
 	  If unsure, say y.
 
+config INTEL_SGX
+	tristate "Intel(R) SGX Driver"
+	default n
+	depends on X86
+	select MMU_NOTIFIER
+	---help---
+	  Intel(R) SGX is a set of CPU instructions that can be used by
+	  applications to set aside private regions of code and data.  The
+	  code outside the enclave is disallowed to access the memory inside
+	  the enclave by the CPU access control.
+
+	  The firmware uses PRMRR registers to reserve an area of physical
+	  memory called Enclave Page Cache (EPC). There is a hardware unit in
+	  the processor called Memory Encryption Engine. The MEE encrypts and
+	  decrypts the EPC pages as they enter and leave the processor package.
+
+	  For details, see Documentation/x86/intel_sgx.rst
+
+	  If unsure, say N.
+
 config EFI
 	bool "EFI runtime service support"
 	depends on ACPI
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 5200001..490fd60 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -34,6 +34,7 @@  obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
 obj-$(CONFIG_INTEL_RDT_A)	+= intel_rdt.o intel_rdt_rdtgroup.o intel_rdt_schemata.o
 
+obj-$(CONFIG_INTEL_SGX)			+= intel_sgx/
 obj-$(CONFIG_X86_MCE)			+= mcheck/
 obj-$(CONFIG_MTRR)			+= mtrr/
 obj-$(CONFIG_MICROCODE)			+= microcode/
diff --git a/drivers/platform/x86/intel_sgx/Makefile b/arch/x86/kernel/cpu/intel_sgx/Makefile
similarity index 100%
rename from drivers/platform/x86/intel_sgx/Makefile
rename to arch/x86/kernel/cpu/intel_sgx/Makefile
diff --git a/drivers/platform/x86/intel_sgx/sgx.h b/arch/x86/kernel/cpu/intel_sgx/sgx.h
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx.h
rename to arch/x86/kernel/cpu/intel_sgx/sgx.h
diff --git a/drivers/platform/x86/intel_sgx/sgx_ioctl.c b/arch/x86/kernel/cpu/intel_sgx/sgx_ioctl.c
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx_ioctl.c
rename to arch/x86/kernel/cpu/intel_sgx/sgx_ioctl.c
diff --git a/drivers/platform/x86/intel_sgx/sgx_main.c b/arch/x86/kernel/cpu/intel_sgx/sgx_main.c
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx_main.c
rename to arch/x86/kernel/cpu/intel_sgx/sgx_main.c
diff --git a/drivers/platform/x86/intel_sgx/sgx_page_cache.c b/arch/x86/kernel/cpu/intel_sgx/sgx_page_cache.c
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx_page_cache.c
rename to arch/x86/kernel/cpu/intel_sgx/sgx_page_cache.c
diff --git a/drivers/platform/x86/intel_sgx/sgx_util.c b/arch/x86/kernel/cpu/intel_sgx/sgx_util.c
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx_util.c
rename to arch/x86/kernel/cpu/intel_sgx/sgx_util.c
diff --git a/drivers/platform/x86/intel_sgx/sgx_vma.c b/arch/x86/kernel/cpu/intel_sgx/sgx_vma.c
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx_vma.c
rename to arch/x86/kernel/cpu/intel_sgx/sgx_vma.c
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 6c217ac..8489020 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1110,8 +1110,6 @@  config SILEAD_DMI
 	  with the OS-image for the device. This option supplies the missing
 	  information. Enable this for x86 tablets with Silead touchscreens.
 
-source "drivers/platform/x86/intel_sgx/Kconfig"
-
 endif # X86_PLATFORM_DEVICES
 
 config PMC_ATOM
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index aec6e53..182a3ed 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -80,4 +80,3 @@  obj-$(CONFIG_PMC_ATOM)		+= pmc_atom.o
 obj-$(CONFIG_MLX_PLATFORM)	+= mlx-platform.o
 obj-$(CONFIG_MLX_CPLD_PLATFORM)	+= mlxcpld-hotplug.o
 obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o
-obj-$(CONFIG_INTEL_SGX) += intel_sgx/
diff --git a/drivers/platform/x86/intel_sgx/Kconfig b/drivers/platform/x86/intel_sgx/Kconfig
deleted file mode 100644
index 9641728..0000000
--- a/drivers/platform/x86/intel_sgx/Kconfig
+++ /dev/null
@@ -1,19 +0,0 @@ 
-#
-# Intel SGX
-#
-
-config INTEL_SGX
-	tristate "Intel(R) SGX Driver"
-	default n
-	depends on X86
-	select MMU_NOTIFIER
-	---help---
-	Intel(R) SGX is a set of CPU instructions that can be used by
-	applications to set aside private regions of code and data.  The code
-	outside the enclave is disallowed to access the memory inside the
-	enclave by the CPU access control.
-
-	The firmware uses PRMRR registers to reserve an area of physical memory
-	called Enclave Page Cache (EPC). There is a hardware unit in the
-	processor called Memory Encryption Engine. The MEE encrypts and decrypts
-	the EPC pages as they enter and leave the processor package.