Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3403288imm; Tue, 17 Jul 2018 04:23:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfquYIvl3KNvcHcToA1pO8kqyn5XfCIhFFnd01kroaK9Hrjxpk5aV3zMqecIeDUWue1nLcc X-Received: by 2002:a17:902:7c89:: with SMTP id y9-v6mr1217221pll.187.1531826611819; Tue, 17 Jul 2018 04:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531826611; cv=none; d=google.com; s=arc-20160816; b=DdWwZhrV4uNJrs4whmKg8JV68HhXiycMhAnbm7tQe6IqIiT3A7IZqwt4+1pg3pZT5A 0VGxU91yoZsXU2OClKIpAkdnB1uU4Jokf5UcY9NoDJKgI8+7DZnIqzWU9+YqVSMl+iww PvVprlxnW5urxAzqYTPyxanjWNKuY+k86rl+e8lP864TL8qP4I466TMpkAYAyZOGifQt AE7VpDqKu53CfOf8+Up+gBaDSINf8qPZqdxp7L6hNdBWdKCfoqGS4CRJrGMggeiLwIYR ou2UkLDnfUsbQRJZKbodKmpPunyIYr3udODmZWP96jiu5ria6GMmFKEPAy0DSDNp1vIR cClw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=zfF6wE27jk8EEZFVmr05watLtl7S0IbAWuZHUfNUQvg=; b=M3WbTIQzh1M8tURfgNa7OZVanxnsfejpbu30AfWE/iYjAF1JgDKRNzdOL728KGuWx7 9x+17iRYuv/R0zPQJLIXAK2/IlkG8hS4QhgURGekJ3jPKrsEmQJH7FaSw/xQlSGgHURE x9caunV+RkiucC1qnriRqGm4YPESqJIUIdL9H/XLKvBLJiHmROiG2OXdsBq7DhLfWUb1 4fdNFqZ1X0YftdNVyN+BKJlk2pVQUg736YGvUVhDUqmcVeK61HOc/lIvh0e+R0q2qMz/ hnvxhTgmAGhJ8zfI3TL1/rrfrjhxBH86w0oKmuBLG68f8P/YwgsZM9JBE9w7+X8zMKS/ Hu2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si676657plk.49.2018.07.17.04.23.16; Tue, 17 Jul 2018 04:23:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731657AbeGQLyU (ORCPT + 99 others); Tue, 17 Jul 2018 07:54:20 -0400 Received: from mga07.intel.com ([134.134.136.100]:40800 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730667AbeGQLyU (ORCPT ); Tue, 17 Jul 2018 07:54:20 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2018 04:22:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,365,1526367600"; d="scan'208";a="67665041" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 17 Jul 2018 04:21:48 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 7D14E85E; Tue, 17 Jul 2018 14:21:49 +0300 (EEST) From: "Kirill A. Shutemov" 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" Subject: [PATCHv5 19/19] x86: Introduce CONFIG_X86_INTEL_MKTME Date: Tue, 17 Jul 2018 14:20:29 +0300 Message-Id: <20180717112029.42378-20-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180717112029.42378-1-kirill.shutemov@linux.intel.com> References: <20180717112029.42378-1-kirill.shutemov@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 b6f1785c2176..023a22568c06 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1523,6 +1523,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 an 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 having 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" @@ -2199,7 +2216,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.18.0