Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753233AbcDZW4c (ORCPT ); Tue, 26 Apr 2016 18:56:32 -0400 Received: from mail-bn1on0079.outbound.protection.outlook.com ([157.56.110.79]:11048 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753070AbcDZW41 (ORCPT ); Tue, 26 Apr 2016 18:56:27 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=amd.com; From: Tom Lendacky Subject: [RFC PATCH v1 02/18] x86: Secure Memory Encryption (SME) build enablement To: , , , , , , , , CC: Radim =?utf-8?b?S3LEjW3DocWZ?= , Arnd Bergmann , Jonathan Corbet , Matt Fleming , Joerg Roedel , "Konrad Rzeszutek Wilk" , Paolo Bonzini , "Ingo Molnar" , Borislav Petkov , "H. Peter Anvin" , Andrey Ryabinin , "Alexander Potapenko" , Thomas Gleixner , "Dmitry Vyukov" Date: Tue, 26 Apr 2016 17:56:14 -0500 Message-ID: <20160426225614.13567.47487.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20160426225553.13567.19459.stgit@tlendack-t1.amdoffice.net> References: <20160426225553.13567.19459.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BY1PR20CA0040.namprd20.prod.outlook.com (10.162.140.50) To BY2PR1201MB1110.namprd12.prod.outlook.com (10.164.168.18) X-MS-Office365-Filtering-Correlation-Id: a749b685-68b6-4a62-1006-08d36e25fbc6 X-Microsoft-Exchange-Diagnostics: 1;BY2PR1201MB1110;2:+PcyGeVWwkiry7W9YCG32ywql1rHutwn0n8ThOBdKn9TtshZNpFE78fNeT/G1k9CHJ6aufFrWey36geXLp4rpl1Q9Xk2Eq+rVSK+uJJRfOCo4pn65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E6bHHJZqln70aEwrpDf5tKqccVOqDUJ3F+TMl1ECd9hLjsl2NXC7GgIx6rIymnXFBMt2taqrGUU7qz9kHdvTpecNmycpKUM7aDkEyoQKeLnyaddU5KIoyw6z3QQn5XX6zwnYW0yIuCMSRhE2WKvI6kglirlHruD2gF13wNJjKaKlgx10enxSKxq4dwdqLyTc45R9MJaYCdFD7JAGKB7Bd24d59C/Lo7DNk7fVEPwwH4e8zJ3+2izqMUm6mfqx0czbynqbZOzPiP+4mYTt1CgtglrlCkc1UTDAHC20uc7/OQfbxX0/qI8nDGylDeasVYQ9a6gF0yv9jBisIh2UrQMKQ4kqx3gfKrZcaHwbL3GUiPchkPDp2EDwG+Zrx9TM2nBo4k0w8LJOYicLo1AMWgMwZYBJ2gUz25WQPaW/M1X2ybcYIPOtE9BAbPx+uxIy2xuYov5tdVlYBvtJ/c/3s;4:isffauLiN3BSUBM3yTdV7FX/jcRLcv8zVlATz7xdwvPiGSa1lD4eFu8Sr4epz91UrUnhD/h4YDYfQAltYNPCMo6CM9SM7ctqZhSUnOQJMlbgxLmfiUW2/DyYx6g4vpcAFD93sY7bjLg4R7P9YLxUgnLrkYcvLgx9lC0y7+XVB3VyeFRQPXXmp9+H9ZKUR5POcEEQ6tgNEUipgh9yRd9PBGsU8y2ik8OaNmmns/psgdWm6NH/ZWzk1XyD0O+uZoCiUGjwo7qdIxeEqPcAQywcgpAMyyAtTtZtZfFxP8BEf8JEsyPm2M88A/y/DXF7AjwNohohCIiQIrVKyP6kggQPGZhhGTAPxjMcZ3TGTKLDo0/3DFWXrEeq+ClsLw5QiXgERknmt1RDee4wNEEXG0NFhAdk1neHRHzFIPwnaKbI3Kk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026);SRVR:BY2PR1201MB1110;BCL:0;PCL:0;RULEID:;SRVR:BY2PR1201MB1110; X-Forefront-PRVS: 0924C6A0D5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(2906002)(5008740100001)(50466002)(42186005)(1076002)(586003)(1096002)(4001350100001)(5004730100002)(9686002)(6116002)(189998001)(5001770100001)(81166005)(4326007)(23676002)(54356999)(76176999)(50986999)(103116003)(33646002)(77096005)(2950100001)(92566002)(230700001)(19580405001)(47776003)(66066001)(229853001)(53416004)(86362001)(97746001)(2201001)(19580395003)(71626007)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR1201MB1110;H:tlendack-t1.amdoffice.net;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjEyMDFNQjExMTA7MjM6Ni9BVW9pOHN6MDlTUDZPL3BVeDUvOFhD?= =?utf-8?B?bGc5aFhXdW1HNVZJMmVjc3N6YzhiVEh1bmZLUEI4YlJ4cWRhS3JCajNlZ2M3?= =?utf-8?B?YUtHTTBLWkRZalVJTk9qYlhxZGMrbjBQYlN0Rkt6QStPSFVGOGRvV3grblNk?= =?utf-8?B?ZTA1WTBEemNvSTcyenRCVEJrQ3ExZXUvb1g2eVY3R3ZtQndaTXZPblVIcHBl?= =?utf-8?B?azhlaVp2cU9xbDE0RFZvM0YwbkJWTVkzcnRqUERMNnFPSTBwZDJqUXo3TkV3?= =?utf-8?B?VEFCUzl2Y3BYUmtpdkZ0ekpub1JWeWtOWGFLZDErUC9rdFlacWRSZEtCM0pD?= =?utf-8?B?Q0labm04QUk0b3hRUW9LVkhRaXBUS1U5ak82OEZ5SjUyOXI0ZndXclVMWFA3?= =?utf-8?B?WktjNFJZY2JYYkJOQ1Bac2JESmlGdEh2TUJWbmxwcVVMM0NHbFFWRUsydjFQ?= =?utf-8?B?U20xaDlnR1lqK1NYUEUveW9hLzVBcEhpczNHUThyY09sWWpjS3ZlcXMxSjBl?= =?utf-8?B?YUo3Nzc4VUUxTlE0cXh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ics: 1;BY2PR1201MB1110;5:eVpad3Hz6qJFpIRhG2IMbWsFN/SsWqW9LnhzVWpOp6h9Cj5EZecjzy1wJmltvCwHVofXYJjiCG7NJHNHbgFIEKpZOv9nD/SleGzYV3lVRV4yB2jjDGbxItwxZidynt2ZI/w1AMDb9BGWMiKiVeNvsg==;24:mavOiDTY3YAkRum3KAmiO/dlrxRR2HkFceh6c1KsgR6zBVUBC0ZXtqJBN25up5weJzIjaYPexbPAwkOmV9fK8JpSosqhlmZWfkb8vFcz5x8=;7:xetkGoQ8f9F6Z3aq61OtShY+3J/gO44lpf4AjGuOPT1f7HG6g25GlgaDanaco8IcwfURL1pax/9rq757+nCts1vEYYr7ZimyLPaM4vjfa9JBYVJhI8gaIIsMkspGPb6FkEs0SKIg6aJkBMFrRb3uPZO1ki9MoGxMAUipuJYVXpM=;20:H1Duqh//3B23HPepBYV2LZu0ZU1eHYC3bAya1Q+uE7VKP2/SCfsKxOo60ko4Y1YeEMNU8b/H93boTu50nry57IKDnqJXX+ZzixJzXy61obICVHA+Mk8mCRf79c6hujUTJjsYUR/H2A9Xy45s3ncENPsmnfO6YFDmIJhJEsp37X3DHUYbqZp9NZ9t5TVBVpM9EnFRA8WoIuNQpohViZKAydQaY1o9IL8fmYQ6jWlCo4tE9wcnwmLqAtw8MqgWuNcO X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2016 22:56:19.3465 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR1201MB1110 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 939 Lines: 27 Provide the Kconfig support to build the SME support in the kernel. Signed-off-by: Tom Lendacky --- arch/x86/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 7bb1574..13249b5 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1356,6 +1356,15 @@ config X86_DIRECT_GBPAGES supports them), so don't confuse the user by printing that we have them enabled. +config AMD_MEM_ENCRYPT + bool "Secure Memory Encryption support for AMD" + depends on X86_64 && CPU_SUP_AMD + ---help--- + Say yes to enable the encryption of system memory. This requires + an AMD processor that supports Secure Memory Encryption (SME). + The encryption of system memory is disabled by default but can be + enabled with the mem_encrypt=on command line option. + # Common NUMA Features config NUMA bool "Numa Memory Allocation and Scheduler Support"