From patchwork Tue Jun 27 14:57:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812117 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 88C976020A for ; Tue, 27 Jun 2017 14:59:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B33C27F97 for ; Tue, 27 Jun 2017 14:59:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E593286AA; Tue, 27 Jun 2017 14:59:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C07EB27F97 for ; Tue, 27 Jun 2017 14:59:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPrvg-0002o3-L5; Tue, 27 Jun 2017 14:57:24 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPrvf-0002nQ-Sf for xen-devel@lists.xen.org; Tue, 27 Jun 2017 14:57:24 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id 29/91-02177-35272595; Tue, 27 Jun 2017 14:57:23 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1VSa0hTYRjuO5ftJFt9m4ZvQ0tXIl1m9sMQiig isbASu4BBl2OdtsVunDNrUdaIUaZtSBepJSaaSeYlikoqTK0VycpKmxD9yAoFwdIts+hC5+zM Lt+v532f532e74WXIbUehY7hXE6Ot7EWvSKOMi1KyTMU8AWFmbc2Z18aq6NWoNzA3e9EPtpKm 21FdtdO2hQafIocgXTXp7duyo0aU8tQHENhDwn3u0NKqUD4NILm/lOkVGjxMQJG++roMjSVUe CFEBr5TEg4HufBxYedCgkn4BoC3lViaYDEIwpofxaMEgROgpraelLCFE6D5siTKFbjXDj96g6 S8FS8BnyDHdG+Vux7OyNKCc/As+BKr4eW9Rp4cv4DVYYYMWAetN5ZJLVJPBtuj1RFRwGnwO2J CYX0B8ClCHw3zillz7ngjzxXyqJkCDytivoAXgcffbwM50C3Z72sqCdgrG6lbONVwPvg45j/f Kht+Bbzf6cEb99NOlbQ8OhLP5KLWxT0lI/H0izQEx6lZVwCl2t/xPpBGn7+dMoDQxpoe/CGqE AG/z+b+v9u6v9n0xpENqJ0geP3cbxhSUYRbzaanFbWbDEszszKsHKCwBo5C1skZOyyW68j8SS miK8NnXWv6kIzGUI/Q30VCgq104rsuw+YWMG0gy+2cEIXSmcYXBs4ulFH2ew2Tg/qew5RpuE5 I+faY7aIJzapBEalT1CHJFotOFirYDbKVDdK1SWqxyUCS4Sp2PZnbPI4X6JkXbwaiX/Sqhwcb zU7/+eHUSKD9PFqhV10UZltzj/uw2IwIQZT1flSsJP9S+ncqCrYlUS+flEZ1zux/WBaSqt/QU lDl2u5rmbtkezKcF7oTPDE/lKfp/WaVum/3+5KnHeYPnC2vuNk2wlnpL4nqWQZe0hQra++kGD /Wrqj5eaWpZlZ5eOqbeGhcO7Ar4VpTWOhyBnn6uneHK1mU86GFzcaW3btDTcnH98+0OQjm7wV ekowsYvnk7zA/gYZSJkjlwMAAA== X-Env-Sender: Thomas.Lendacky@amd.com X-Msg-Ref: server-16.tower-206.messagelabs.com!1498575440!89448692!1 X-Originating-IP: [104.47.32.76] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 60445 invoked from network); 27 Jun 2017 14:57:21 -0000 Received: from mail-sn1nam01on0076.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) (104.47.32.76) by server-16.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 14:57:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=5KdJxKL+w6r2KAuqTqr9kxwekL5aj4U8wWEp9DorKWw=; b=WRWqgP3jbA00BhXPJ6LBmzRTQMCDBb1WN4LlBL9yJKnp59fNwIHNksxWV8MMoN/4cHEu4CXP5FmmXhQy+q2f5LWhRtRiuZoc2It9vhb3+oG8zAvaDsooteeFoQkKOu0V30QqAa1YUfl0PhoR8gO7/DBO90b0nBUF/OLEcK/P8oc= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Tue, 27 Jun 2017 14:57:16 +0000 From: Tom Lendacky To: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, xen-devel@lists.xen.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org Date: Tue, 27 Jun 2017 09:57:13 -0500 Message-ID: <20170627145713.15908.42762.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627145607.15908.26571.stgit@tlendack-t1.amdoffice.net> References: <20170627145607.15908.26571.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR1001CA0009.namprd10.prod.outlook.com (10.174.84.22) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d59548d0-a570-4cd5-7d2d-08d4bd6ccf5b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 3:MXNxe6h7sYQZ1h0N+Zif0LkEGDBxQzIq7ISRlR2y/73VbdFQN0k7D/O9psYgl7+gpDU/bE6SSvuKemVRgpqWN99yP6LRHifhYFJq0VshOD1F99kYTYlBYyZHY2jW38h5N9n7Uh3VdlMnd3Dvoz9aSh4ovj0CduVe1a9dsgYk1yIvjyLzPkDwCrlUJTzLHB9IJpicrA9337Sqe0gszuEqxo7o1KEfW1gI75hBjSU7Ishdf/WE//q3VOUv6Yt1guBtJTN0PeaLySa1IdryZPCmt7miWBMftQjoJH2HirLjdLFPr5VjnHV89DfbhVJQv3KvwL/lC56Eb0uTL5ZxPdf8X/yA5taHLLmLGzqdD8IYugZk+u9/biM3iEr/oBx0sku/fGBD7d1JSmPQdnuVYTw+AWKKujt/CXD9Hu0D2q4KkrTxQzDUh2VADMN/djiVmbG4oNbv3PKmVYMpjV8Hjw7QP0ean++r4Uq1NG58qN2D31iXoOJY9FySfKeTX2FTc+IIfOEUlLkXhnR5rEAIkwVKVXUq5jheLcRla5TxS24K7vTEXlc6Fd/suJTpOEmB+LUMM0KiWhcymVhYoYqFhhVl/gibx039GamKkIJJNTVEDvcFfmGGIIOfsEA6C/aU48l5/2bEgkZdH1sU35y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0PBZv23IXZtxNm4LYusM9JOdd12ayNsEJSKVrR0N2Q4r72ln46595FSPC6KrNZAgues9/5XLDMwIEp2nV2j52UnhBb2suERUjpICVZoVJR9JcAd4hwMoxvhVlRdqSe5nsUE3b6nlJYsboNjrSXyJgx9mI3P3euOxnEUgZI7l00KFTXgQyZoOU0eKHGbdMseGIX5f4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(125551606395959)(133145235818549)(236129657087228)(767451399110)(148574349560750); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR12MB1141; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzQ6U0lzTktuWVJDUk95ZlJER3p4SjVoV0NHUVZp?= =?utf-8?B?V0FVU3Qza1hQMDJrbzQ4Q05IekdjUXJFY1BQQjlEcENrMSs2S1VFb2xNZXBH?= =?utf-8?B?MU5XNkxBU2RWQWxKYVZkVTVoRU1sZHpvZW1DZmlYS2pZeTA3VHYrdWJlWE5R?= =?utf-8?B?SWFuL2c4cEQrdCtVMy9xNmVPRmJ0d3BzcWorY0x5T253UG5mN1BXMndQVC9E?= =?utf-8?B?TWNCUnVualYzSHFEOVoyY1hNZG10QndIUFdWckJERlpTZ0pDSVBUbWZuSkU2?= =?utf-8?B?cWNYclhKbytnU2FhZzh3YS8zVEhzckJHY3JsQ2t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dTRaWlBQdFg3WUFtNnBDM1R2MUlFSVNVM3c3?= =?utf-8?B?eDRuekZQck9XZjhPVHU4aFdrOHJza3Z1Q1JMV2pjTjVJUUxtZmwzQWd2NG43?= =?utf-8?B?dmxOQVA4OG9QL0xhSng3VXozeUYxTHVWTDU3OWgwa0ZZRDNJQjR0VytDdC9K?= =?utf-8?B?L1VVUXd3b1NqZzh2YlZDLzVtMDFUTlArYURCWjZOZE10VEdNWEZ2Y1dOaS9U?= =?utf-8?B?ZW9pTTRGWFpMY21KbTNhUXZCNjF3YkpUcitOYnRiSkJNQUI0Y2ZueUt1Ri9B?= =?utf-8?B?N2kyNi94UFN0TFFYMXhQVlYxUkxkQXJJUDJ5aEtXMmFFQzFnRk4wKzJIanlo?= =?utf-8?B?c3ZhUU4rdTBRRDI5NmtOTFNneWVuS3czbG9iRElPT0pza1g2RGNPb0lSSm8y?= =?utf-8?B?cjNPNERFSzFUVERSaUQveWlxcDB4SGJrbExZclJuQkhhQ0dCUHZoSytmejVx?= =?utf-8?B?SVQrSUFGZFJwcVBqdUJ6UHJHUWpXRzBlZkJDTzhqV3ZjUy93ZzQ3MSszdkRM?= =?utf-8?B?S21RRE1VT2VqK2RteVA0cEwyVElOVCtkenNHb1ViTmhuZHViTGNFYzVWTFBO?= =?utf-8?Q?2V2bddhhKYcX?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39860400002)(39850400002)(39450400003)(39400400002)(39840400002)(6666003)(54906002)(9686003)(2950100002)(6116002)(55016002)(83506001)(110136004)(38730400002)(2906002)(54356999)(76176999)(23676002)(53936002)(8676002)(230700001)(4001350100001)(478600001)(25786009)(50986999)(3846002)(4326008)(1076002)(189998001)(81166006)(33646002)(7736002)(103116003)(42186005)(66066001)(47776003)(50466002)(72206003)(53416004)(97746001)(5660300001)(305945005)(86362001)(7416002)(7406005)(6506006)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; S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7d9keqfNZvGtOJaet7yj/6TaWdqvtcgpjMnGBLXCgaiwLs= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 20:QwscSVvfvcMZ8qmOA0sYTTHdLYT/5KxYZsHyOnaeD0LUK0+Y2YwbR4y1lsFz1+CHkuImQoo2SLScneBr32DBbkFkw4JkcsZQ9R4oBJWARTu4zusrPmZdlXLwiHlcDBeaMKA5z0twVs4ld/EMg6BekXK++IFkU+iSFduAwnGup9yp4RrUXuEris5gDvendZImTQSwe9wgH6xodO+Fjwrh5F2SnnOor1QQ0We6AicgDKD4Rb/RfwfxlSdutndF5p/r X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 14:57:16.3923 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1141 Cc: Brijesh Singh , Toshimitsu Kani , "Michael S. Tsirkin" , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Boris Ostrovsky , Jonathan Corbet , Joerg Roedel , Radim =?utf-8?b?S3LEjW3DocWZ?= , Larry Woodman , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Dmitry Vyukov , Juergen Gross , Paolo Bonzini Subject: [Xen-devel] [PATCH v8 06/38] x86/mm: Add Secure Memory Encryption (SME) support X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add support for Secure Memory Encryption (SME). This initial support provides a Kconfig entry to build the SME support into the kernel and defines the memory encryption mask that will be used in subsequent patches to mark pages as encrypted. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/Kconfig | 25 +++++++++++++++++++++++++ arch/x86/include/asm/mem_encrypt.h | 30 ++++++++++++++++++++++++++++++ arch/x86/mm/Makefile | 1 + arch/x86/mm/mem_encrypt.c | 21 +++++++++++++++++++++ include/linux/mem_encrypt.h | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 112 insertions(+) create mode 100644 arch/x86/include/asm/mem_encrypt.h create mode 100644 arch/x86/mm/mem_encrypt.c create mode 100644 include/linux/mem_encrypt.h diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 72028a1..3a59e9c 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1409,6 +1409,31 @@ config X86_DIRECT_GBPAGES supports them), so don't confuse the user by printing that we have them enabled. +config ARCH_HAS_MEM_ENCRYPT + def_bool y + +config AMD_MEM_ENCRYPT + bool "AMD Secure Memory Encryption (SME) support" + depends on X86_64 && CPU_SUP_AMD + ---help--- + Say yes to enable support for the encryption of system memory. + This requires an AMD processor that supports Secure Memory + Encryption (SME). + +config AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT + bool "Activate AMD Secure Memory Encryption (SME) by default" + default y + depends on AMD_MEM_ENCRYPT + ---help--- + Say yes to have system memory encrypted by default if running on + an AMD processor that supports Secure Memory Encryption (SME). + + If set to Y, then the encryption of system memory can be + deactivated with the mem_encrypt=off command line option. + + If set to N, then the encryption of system memory can be + activated with the mem_encrypt=on command line option. + # Common NUMA Features config NUMA bool "Numa Memory Allocation and Scheduler Support" diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h new file mode 100644 index 0000000..a105796 --- /dev/null +++ b/arch/x86/include/asm/mem_encrypt.h @@ -0,0 +1,30 @@ +/* + * AMD Memory Encryption Support + * + * Copyright (C) 2016 Advanced Micro Devices, Inc. + * + * Author: Tom Lendacky + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __X86_MEM_ENCRYPT_H__ +#define __X86_MEM_ENCRYPT_H__ + +#ifndef __ASSEMBLY__ + +#ifdef CONFIG_AMD_MEM_ENCRYPT + +extern unsigned long sme_me_mask; + +#else /* !CONFIG_AMD_MEM_ENCRYPT */ + +#define sme_me_mask 0UL + +#endif /* CONFIG_AMD_MEM_ENCRYPT */ + +#endif /* __ASSEMBLY__ */ + +#endif /* __X86_MEM_ENCRYPT_H__ */ diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile index 0fbdcb6..a94a7b6 100644 --- a/arch/x86/mm/Makefile +++ b/arch/x86/mm/Makefile @@ -39,3 +39,4 @@ obj-$(CONFIG_X86_INTEL_MPX) += mpx.o obj-$(CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS) += pkeys.o obj-$(CONFIG_RANDOMIZE_MEMORY) += kaslr.o +obj-$(CONFIG_AMD_MEM_ENCRYPT) += mem_encrypt.o diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c new file mode 100644 index 0000000..b99d469 --- /dev/null +++ b/arch/x86/mm/mem_encrypt.c @@ -0,0 +1,21 @@ +/* + * AMD Memory Encryption Support + * + * Copyright (C) 2016 Advanced Micro Devices, Inc. + * + * Author: Tom Lendacky + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include + +/* + * Since SME related variables are set early in the boot process they must + * reside in the .data section so as not to be zeroed out when the .bss + * section is later cleared. + */ +unsigned long sme_me_mask __section(.data) = 0; +EXPORT_SYMBOL_GPL(sme_me_mask); diff --git a/include/linux/mem_encrypt.h b/include/linux/mem_encrypt.h new file mode 100644 index 0000000..59769f7 --- /dev/null +++ b/include/linux/mem_encrypt.h @@ -0,0 +1,35 @@ +/* + * AMD Memory Encryption Support + * + * Copyright (C) 2016 Advanced Micro Devices, Inc. + * + * Author: Tom Lendacky + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __MEM_ENCRYPT_H__ +#define __MEM_ENCRYPT_H__ + +#ifndef __ASSEMBLY__ + +#ifdef CONFIG_ARCH_HAS_MEM_ENCRYPT + +#include + +#else /* !CONFIG_ARCH_HAS_MEM_ENCRYPT */ + +#define sme_me_mask 0UL + +#endif /* CONFIG_ARCH_HAS_MEM_ENCRYPT */ + +static inline bool sme_active(void) +{ + return !!sme_me_mask; +} + +#endif /* __ASSEMBLY__ */ + +#endif /* __MEM_ENCRYPT_H__ */