Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6277577ybi; Wed, 31 Jul 2019 11:25:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhHSwzhTTqLlJz8r8RsqrAOp9hn7oF0VxPy34UJjN8MO7tyUJzuq1KQOzjCnxRLBWmmoeq X-Received: by 2002:a65:6281:: with SMTP id f1mr108518440pgv.400.1564597503065; Wed, 31 Jul 2019 11:25:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564597503; cv=none; d=google.com; s=arc-20160816; b=peiX2EKvZIUwe+DvHZFzhpKuAn/86n3AF1dpo8j/WsRm+xbAe6dhJicJqYf/STzV2S q6jbNxBamrfYZgojETO/1sGt/CLmKU+DkIJWNN38Hf4RJQOhC/81DQzZRvAjMcDuQGfW XO91x0D1IjdnJSWsCmaio28DZPf7PSE2+0k/WP1oXOIKQKUcMT8jpEkfVDJzk54AYpNW nHqawsuNGveIE3Cw6paBF3Xz48hTI7DqLOc/O+LYqPxVqRjKCi/Oqd3RJP7lpgxIw6xe yKoMcawqszIJqCxR537IjYP8gCPYIPtt6AZ0cxI+J0UB48CZTEwc6BNGnqhiM1IXgEoX lbVA== 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 :dkim-signature; bh=V4Vs01tlfRxj/hdhWvsn+MzzX7wMrP0xYcTZ6W3t7PA=; b=mRKf0DaVD+dyXLzxLbCxGrGCgokw+9SuWlmzz+/hSaC87G5Psb0V/FuO4I7KXigtQO VN1nHbAP/eUGAOhEfAdGBp7pAPj+BQ+ir9bJuJljtViSUn+k3hdQ8uT7+v/eCrHTegrL /1O/uTvq15SvnIUFLmdeTJ3qYDzcDzMka0wnzkqqpYFLjp1kHu6xxJcH4W6oONbO4Oe8 NBCT5aw7NF7VWPw15E3uiB4M1UvoxeWQYrrFb3HD++kraFWggdDlSNcfj/JQVigyonx5 uZVZcwKR5q5aE0RGsOevP6rJy0DJUT84WGm1aFc7n4LoRqGry/PTSWZ29vfWOlW6t4xb aP/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=DnqAXhTZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si33865348pgo.511.2019.07.31.11.24.46; Wed, 31 Jul 2019 11:25:03 -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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=DnqAXhTZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729954AbfGaPYT (ORCPT + 99 others); Wed, 31 Jul 2019 11:24:19 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:37831 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729098AbfGaPXw (ORCPT ); Wed, 31 Jul 2019 11:23:52 -0400 Received: by mail-ed1-f68.google.com with SMTP id w13so66107128eds.4 for ; Wed, 31 Jul 2019 08:23:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V4Vs01tlfRxj/hdhWvsn+MzzX7wMrP0xYcTZ6W3t7PA=; b=DnqAXhTZp01yN6WSw/evIc0boNe52PO2BoJktJtMh2RgostVls+YOyjDU6sjdeAXpu pYNcxAcwMJyK9ACo0Uze5/331zleuRgZ8tdMXcyXHPouR7MjjLnzEm4vrrvRLtE8OL+z 76Cfo0xHGEhi44+MBvlBGlpc/EOvonqmzkGktFkI44+xmuDaiqapmC1Xp/Y9zTg7OInG a9YhCGJldybaRAWWZ5RBIZd3ymSs+wsjDNu5AUmyHnhmm+vat7AO8LplmVvMjX0krWt7 jQavX89FPCTjy4eg6GZ4rPAOp0XfZXIvJviPw7ZSaRn3QUgHcgBLfJ3RAn+sdl9p07vK IUrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V4Vs01tlfRxj/hdhWvsn+MzzX7wMrP0xYcTZ6W3t7PA=; b=lOsX1k6nETP/S3FPkRbju+zp9180x0L/ctKxkZzx6xuyyWdL3IFaEKVBx7QXGOpNBr FHXG3xOxoOYfutSNA19+McRR3fMGOw3Xo+CWO17T6h+FlsUy4RcK4h+/roopb5k6Drwa m7f2mecNjqLJZGfSBOxuoPrSn/bscdNQA8YtgExKjCMLBdz+b57xjcjiG1d9a1ChC3ka KOdNL9f9V9M+fT8F4un+5bM7be+iuBohmB4YiGX2b5f6uXoHv1NHvWO0lZndi/Yysk2y 3xmdn9nbvYfueg8BIpFeAKkpne1ZO7Xy3NCW+oVM/rck2kNXn9YZYG1SrvDBL/Tn5Jwg 8tYw== X-Gm-Message-State: APjAAAWRSgrO+lv+MV65G86LynorpUnDLtRRpNv4MzU1KJDLJjjbM5Rd D6jhIkK1fjxzIHwcSka03u4= X-Received: by 2002:a50:9116:: with SMTP id e22mr108657772eda.161.1564586630746; Wed, 31 Jul 2019 08:23:50 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id 9sm8073176ejw.63.2019.07.31.08.23.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jul 2019 08:23:49 -0700 (PDT) From: "Kirill A. Shutemov" X-Google-Original-From: "Kirill A. Shutemov" Received: by box.localdomain (Postfix, from userid 1000) id 6C43A1048A5; Wed, 31 Jul 2019 18:08:17 +0300 (+03) 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: [PATCHv2 53/59] x86: Introduce CONFIG_X86_INTEL_MKTME Date: Wed, 31 Jul 2019 18:08:07 +0300 Message-Id: <20190731150813.26289-54-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190731150813.26289-1-kirill.shutemov@linux.intel.com> References: <20190731150813.26289-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 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f2cc88fe8ada..d8551b612f3b 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1550,6 +1550,25 @@ 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" + depends on X86_64 && CPU_SUP_INTEL && !KASAN + select X86_MEM_ENCRYPT_COMMON + select PAGE_EXTENSION + select KEYS + select 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" @@ -2220,7 +2239,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.21.0