Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5424823imm; Tue, 12 Jun 2018 07:40:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL6Gfng5RfLtyjc2BQtkHFOSFImSZX3vdrZ3kQCr9ipAdm0LzIpb54WdnIaqMEdCofccwro X-Received: by 2002:a63:6501:: with SMTP id z1-v6mr569501pgb.452.1528814450860; Tue, 12 Jun 2018 07:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528814450; cv=none; d=google.com; s=arc-20160816; b=VfxnNHbNKvUDARyLObzgrNQwo9/PgQ5ITcgt3q60fPK85Obt/kiQRUD1mb69AVTkP7 qkdw8Bmue4szc/yReZ0n9o3sKJdl5gh+i16mME1xDVPlvb42txVjLFX2Iq0TX103tjIa R/YcGoW1WDsGKOxkE9pZF1G75+jw2hMVzsotBTolT7ECD3T8AIhp8vq0PjmjJ9cYR93h weYvNJOu5nS/fLtjEgDoedWBAhA/vkM5G43Oacw9sWUBYzo70RpRz9R4iml/rKuEhF5P hNreI2L2DuoJ+KINcJnKfpwYB1bnLDAR8qctaP/ARtjNRxLge/FWudoQ88M0EfQIrwZI Nhug== 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=kSXdXxWfS7zxJMMqqV3s1VlG+zUBxvqZnP8EcUGLkPU=; b=uQob6WAXooBanR7wp7LNIP9RsNyv41ocH/SlX0mgWsAskofttDH6yyqRwF1iW04X5u TZuAZhQBorSJg6PaW6UfUsWzKc0Xz2d1YdIHuTwe/X+UiZeRb75J/6pX2zuU2MpmFrSX PJVVX1VVkwmsEgBmgIvWOYuUnz248WJH66M/Ek/CzQyOUgzGLIGLC0VWJWj0tlOVMZsz 2KyrFTx8ybD7/Yf5n9KThEBBbo32+UTVEgYzR3GKpoAjBM+s56QaOoQBMV0ERsQh7aIP uKW4r2vTn8qw+tkueG2scHnWxp2zvMkHD8xnSl4LpfGVc3kIRisVBfs3jIZwjQF3I/QA mBIA== 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 x7-v6si260088plo.303.2018.06.12.07.40.36; Tue, 12 Jun 2018 07:40:50 -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 S934369AbeFLOji (ORCPT + 99 others); Tue, 12 Jun 2018 10:39:38 -0400 Received: from mga09.intel.com ([134.134.136.24]:45411 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934348AbeFLOje (ORCPT ); Tue, 12 Jun 2018 10:39:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jun 2018 07:39:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,215,1526367600"; d="scan'208";a="46538453" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 12 Jun 2018 07:39:30 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 53F47892; Tue, 12 Jun 2018 17:39:21 +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: [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> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180612143915.68065-1-kirill.shutemov@linux.intel.com> References: <20180612143915.68065-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 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