From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f70.google.com (mail-pg0-f70.google.com [74.125.83.70]) by kanga.kvack.org (Postfix) with ESMTP id 7FE7A6B026D for ; Tue, 12 Jun 2018 10:39:35 -0400 (EDT) Received: by mail-pg0-f70.google.com with SMTP id d10-v6so7809752pgv.8 for ; Tue, 12 Jun 2018 07:39:35 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com. [134.134.136.20]) by mx.google.com with ESMTPS id bf10-v6si279581plb.423.2018.06.12.07.39.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 07:39:34 -0700 (PDT) From: "Kirill A. Shutemov" Subject: [PATCHv3 17/17] x86: Introduce CONFIG_X86_INTEL_MKTME Date: Tue, 12 Jun 2018 17:39:15 +0300 Message-Id: <20180612143915.68065-18-kirill.shutemov@linux.intel.com> In-Reply-To: <20180612143915.68065-1-kirill.shutemov@linux.intel.com> References: <20180612143915.68065-1-kirill.shutemov@linux.intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky Cc: Dave Hansen , Kai Huang , Jacob Pan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Kirill A. Shutemov" Add new config option to enabled/disable Multi-Key Total Memory Encryption support. MKTME uses MEMORY_PHYSICAL_PADDING to reserve enough space in per-KeyID direct mappings for memory hotplug. Signed-off-by: Kirill A. Shutemov --- arch/x86/Kconfig | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 4fa2cf807321..d013495bb4ae 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1513,6 +1513,23 @@ config ARCH_USE_MEMREMAP_PROT def_bool y depends on AMD_MEM_ENCRYPT +config X86_INTEL_MKTME + bool "Intel Multi-Key Total Memory Encryption" + select DYNAMIC_PHYSICAL_MASK + select PAGE_EXTENSION + depends on X86_64 && CPU_SUP_INTEL + ---help--- + Say yes to enable support for Multi-Key Total Memory Encryption. + This requires Intel processor that has support of the feature. + + Multikey Total Memory Encryption (MKTME) is a technology that allows + transparent memory encryption in upcoming Intel platforms. + + MKTME is built on top of TME. TME allows encryption of the entirety + of system memory using a single key. MKTME allows to have multiple + encryption domains, each having own key -- different memory pages can + be encrypted with different keys. + # Common NUMA Features config NUMA bool "Numa Memory Allocation and Scheduler Support" @@ -2189,7 +2206,7 @@ config RANDOMIZE_MEMORY config MEMORY_PHYSICAL_PADDING hex "Physical memory mapping padding" if EXPERT - depends on RANDOMIZE_MEMORY + depends on RANDOMIZE_MEMORY || X86_INTEL_MKTME default "0xa" if MEMORY_HOTPLUG default "0x0" range 0x1 0x40 if MEMORY_HOTPLUG -- 2.17.1