Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5288985yba; Wed, 8 May 2019 10:44:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqywxWS0JPa/UG5sg5VQg4O6TFN3kTgsIu2cdu2kv/9RBkV7f3G0k1GcbEOPgASLNhBpDwGh X-Received: by 2002:a63:af45:: with SMTP id s5mr48223344pgo.420.1557337459287; Wed, 08 May 2019 10:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557337459; cv=none; d=google.com; s=arc-20160816; b=vUg1cHaLT/ZHKcIhv3NZjKT/ITKHM4NBjeA9JZZZb/1icTB5e3FWZkbO6YTuOJ1B+P YaqpptNfWKygU889+lHJdip6UqSDabfa1fjfRlw3b8IdZM3TDuRgtJR3xXvbiEjj64jv OdOj/4UDC3ZHeZz5vLeQh9N1K9mQo8I6Vy+jKNuHrLeUuZJZ6lW1cUsPizjIa9Ckpa1p Xs2NBG6qNCyNKd9eDzxj8T1ayxMctJOa/kbPXpaIU0mKJeUzSwZkm3BGBqBaFL9MwUd2 nYvZHhsorqTyXzyjdcgsHKZ+hcsy8rxERg8qA4X8D8hBzYbTDwC4ja12Ck2ZFmRcxlj5 eDrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=o5KW25YTExVeHUad5j7wl2zSQfDlvno755Y/jyretlU=; b=pUGDQCNQjLzkdV3dn3LG7GxECXoursE2l7OiaoT/g4Qwsuftmx/OlcQwPA3WFgWzcL kWIo2iAWII1AZV8jDHNWn84Gut/Kq2ZlMwyhqvp5hmK8+1V5oexQ0s7Qv+q1GIiv82UN Onb4UutroUARIs5nM+dGm+cgqdQbf4P4aQfKcycwiSJ2IqmgV7vCbsUAdWKz7cBc1Dm/ D97fd7K7p7Co1siXISFfOYsaN3K68VZ8J2pbcURxUynB7vgg3tStrVOGuQfeOZ2hJC6i MzBYvUd2L0yS4ZGXwk0O1FBQXXBc2UGDFmnog9GiRGKY0p+yue/M181OndOCzyyGYu+s EicQ== 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 f7si10271915plm.427.2019.05.08.10.44.03; Wed, 08 May 2019 10:44:19 -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 S1728859AbfEHOpU (ORCPT + 99 others); Wed, 8 May 2019 10:45:20 -0400 Received: from mga11.intel.com ([192.55.52.93]:7390 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728537AbfEHOoy (ORCPT ); Wed, 8 May 2019 10:44:54 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2019 07:44:53 -0700 X-ExtLoop1: 1 Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 08 May 2019 07:44:48 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 7CDA2117C; Wed, 8 May 2019 17:44:31 +0300 (EEST) From: "Kirill A. Shutemov" To: Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Peter Zijlstra , Andy Lutomirski , David Howells Cc: Kees Cook , Dave Hansen , Kai Huang , Jacob Pan , Alison Schofield , linux-mm@kvack.org, kvm@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCH, RFC 56/62] x86: Introduce CONFIG_X86_INTEL_MKTME Date: Wed, 8 May 2019 17:44:16 +0300 Message-Id: <20190508144422.13171-57-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190508144422.13171-1-kirill.shutemov@linux.intel.com> References: <20190508144422.13171-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Kirill A. Shutemov --- arch/x86/Kconfig | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index ce9642e2c31b..4d2cfee50102 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1533,6 +1533,27 @@ config AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT If set to N, then the encryption of system memory can be activated with the mem_encrypt=on command line option. +config X86_INTEL_MKTME + bool "Intel Multi-Key Total Memory Encryption" + select DYNAMIC_PHYSICAL_MASK + select PAGE_EXTENSION + select X86_MEM_ENCRYPT_COMMON + depends on X86_64 && CPU_SUP_INTEL && !KASAN + depends on KEYS + depends on !MEMORY_HOTPLUG_DEFAULT_ONLINE + depends on ACPI_HMAT + ---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" @@ -2207,7 +2228,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.20.1