From patchwork Fri Jun 16 18:50:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9793229 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 85C7F60325 for ; Fri, 16 Jun 2017 18:53:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 799A02865B for ; Fri, 16 Jun 2017 18:53:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D7DF28670; Fri, 16 Jun 2017 18:53:32 +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 849F72865B for ; Fri, 16 Jun 2017 18:53:30 +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 1dLwKs-0001R0-VO; Fri, 16 Jun 2017 18:51:10 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwKr-0001QQ-QK for xen-devel@lists.xen.org; Fri, 16 Jun 2017 18:51:10 +0000 Received: from [85.158.139.211] by server-12.bemta-5.messagelabs.com id 28/B3-01735-D9824495; Fri, 16 Jun 2017 18:51:09 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1WSbUhTYRTH9+zeXa/m8nEmHkemzkozNy0qogi FFCyyIqO0iLqrmxtsU3anLSiatXyHfAHJabF8GVhU4IcmSiKGUTbDFHQVvSB+CEtdZdiwst1d U/v2e87/f/7nOXBoQnaNktOs2cQaDYxOQQWRmmTFIeXNhPTclPm26J2tX1vINJTZ3z0vPoxOS LQGdb75jEQzM9pNFYzFm4uLS0gL6oytQEE0ia0EtNS4EP9AuA7B/bFagn/IcIkYWpqnyQoUSF M4CUanZsU8h+ED0HOvSsLzGmwXw3g95hsIPEVBz0sXxQtivBbszW0EzyTeAP1lNj9LcSbMep7 6mmk6EO+D6+/9+TJfudQ75+dwvA7aR6wSwR4KzxsmSN5O4E3wsCuZLxM4GpxTTf5EwDHgnJuj +C8ALkUw/+DLYuZ6sH0fChBMUdA/2EQKnAWNf3r8mYDjYMB6UChfBvfjnxIhpyYAOsvrkeBJh BtVGYLHQYGlWymwDnp/d1AC74TKO7+Q0OuSgGPctTirGkPN3V0Cr4Veb1mAYGqVwLc381Q12m xbsadteU/bij3tiLiLEjjWWMQalVu3qdRGbZ7GpGe0OuWWlO0qPctxTB6rY9Sc6my+vgP5LuK KSIQ60eu6g30okhYrwqUzE3tzZavV+ecuahhOc9pYqGO5PhRP07i5/2q2nDTkG1gFSBc2pufK Qo1sHms+r9X5LuyfE+hgxRrpufU+WcoVMHpOmydIAyhWHiFVxvsEzAuaQsNS27/bHEZR8jApE olEsuAC1qjXmv7XJ1EEjRRh0iN8SrDWYFpKn/QNFvsGHxlK4webmGVJbkG9Tc9jHj7p8rRHJL nSBjcdX7UQUjk0JHLWZDjLh1vfxnkXvDuIhmvZij0XLvb2OWYPRXeqoj45vO7aW8lF6SG7xys uTWebSu05tQvO4JgB3clXliR31/7PktuThVnxp8TH2t05R398ePGxqNGcOTJiDSweS42eS332 LuSR3hLp8ShITsNsSSSMHPMXAA2BxpYDAAA= X-Env-Sender: Thomas.Lendacky@amd.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1497639062!99362086!1 X-Originating-IP: [104.47.34.79] 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 37000 invoked from network); 16 Jun 2017 18:51:04 -0000 Received: from mail-by2nam01on0079.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) (104.47.34.79) by server-5.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Jun 2017 18:51:04 -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=hOjHtjqyIjiQt/nPsJu9SMKqitGmUvlf73cWIhqwevs=; b=pGQx69b+QSAqPvg8EeqwzyDgAaDb07Wlm48XPpam0B7yKXiVjEt9DQAUdfVsNQONuUhuSjQnb6495L6gP5GqldREwDG1OZpZsb+lU+Li21U0ZjVatpSQDyIxQvrPuTpFAkAl3nh4CWOQP3gkrOf16xAJ4OXznPEenDVtp0j92U8= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by BN6PR12MB1139.namprd12.prod.outlook.com (10.168.226.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Fri, 16 Jun 2017 18:50:57 +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: Fri, 16 Jun 2017 13:50:54 -0500 Message-ID: <20170616185054.18967.52228.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> References: <20170616184947.18967.84890.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: BN6PR04CA0049.namprd04.prod.outlook.com (10.174.93.166) To BN6PR12MB1139.namprd12.prod.outlook.com (10.168.226.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 446f1290-0f20-4b43-da26-08d4b4e8a0aa X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:BN6PR12MB1139; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1139; 3:V38yamm/Tmvqso0wTdtpoKWaKrNNgBDo+G4pXRIIu+e52QrPd6DGCK0wJ98wIVcBWI4gPCL2ubiIRCwEZz9ZGZYWtGt/bymY3zZG+Oulp7qtvuzTP0B290rAD93IyH/p472ZkvDeLQqy29mcVpiUWhUz+V+oeusxEYJ9HDUpGcJ/zc7k/vh+FZSY3x0rLbWOqDNxkp4jLonM2bisGZq5eSFlSSLNNzDCA8auMwVuv798gkhD86AN0MwPV5QYm8wTgpw7tn0OvgrtGKj78SBKI3D3G8sK9FYTgUNk/UGR+WneBMa2DDiO4YtuE3B9OAbFmmy2vGETk1wkcwVDThcL4W7PrV0jGlVI+lnXe9gqpdo=; 25:cHScjeJpxEuz83fR/u25ncDDncPzOhRQr8Zq4yZdgyxXfk5Dt2WwGE1jYHecWtCnDSHwWpQvqnAyd7wAT+wOe46ViKARtUxu79s5R/8s6kGFhaUCIVrXRh0/A4yUUUqQwBwc5o93+omJPJFzCmijePJdZ0MxYUzcgnDLbuKmzHYKX6nNYhwu4+wMRbhXR3+W9jvMlUunr+yVqtZDJ7XZQUS97t3cMeFCJK2NU1XQJ44oUWeqy25QEX0WmIAleb2JjtRk+/cCmSpX2VgUiuy+dLrgRm8ZtuQeyr+Z8WJh2UUGIfv37jnhJVLabhdxIXUARmbYHrUWwjYfZMiSM/VTpHj56GcaOje1wz+b11F77850MvZJ7I7A5bfrTgVGE5MkQ2ddlT4DMwBCwej7Jl0m9IbLVsS23hNUIvToLnPaYgyf2xyMZhRQRUDrPM8ZiaZEt6umBkugKf5INNFoA6zRWLxSxUMRFQBSn33PPd/wkdY= X-MS-TrafficTypeDiagnostic: BN6PR12MB1139: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1139; 31:6IUTiTPfQB2S6TsUL6thGPP24fWEiEDRrVg+1n6d+7TFsX86HqpFwfu6aLm5bRhi0e8vHvn3RKDkbPMD9OAwPYLNaCmEJBf0lkd1lgdBLXTQlOb4B/zpndgbmlLX0TpDNOxeL/zjl3UC86hfLTs/VJ82YUkQjRd+GsfMrriQ7VBK9fZrZhGdNGgOqNsYlBV39kn8BZzWhvevohS6n0bmN4sxmXVq4FDDt4XCJOCcs9c=; 20:mDD4liX3HwUpVkQQMsIzsHmvS3ssgKAJQsU0at2xbkzJiPHL4qQxsgxqapfkbdqW8Ts+yToOdh17cNJ3nY8mtjDtoCwOQuD8XVbLskR23FbaWHzbdL3C/V0h5emgWgVsuBxPVqMrcZOKM3MKaqDBXq2pjjYb9nTCtuk8lT4XkAjyk5wU1nq1t9cB5QI34AdVUjeyk2phe0QIy6cuxgvI4jp6EtDoUNTyLkuaDikkfY6lW/MObYaPBLnbdCUzJm5knzY1kNRALLwC17Lo6lj3aIN2BZMvRpEnQb0kBFSqfpmmbGSUn61qzISgvpGIPtb1IVvCe3iGylruIdgLhVBvQf5tP8O+dJTr506AKXak2DOm+cvJqEr+mzj32lqbLVJ1z1Z4N0l5RR5J9YirU5PkEV8toHXQD+OOE/3v/6v6A845lMYfAz17GpIsc0h1toiTGGm5h6oj2pmZ2Zq2CEpPWbCv0d1vuEJiKlwRB0y/Gr1BmFoHEBdM/YKpWXDBaZhE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); 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)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR12MB1139; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR12MB1139; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM5OzQ6c0VvdmdvZ0JRYlB4U2Q3NmZ5bE9Vd0VTVEkx?= =?utf-8?B?M3FNWU5xQlNnZm1Rd24va0RuM1BFZmp0Z1QvRzBVMzhRQjVsdnltb083ZGNP?= =?utf-8?B?YnpFQWE1K1ZVVjJ0UnFzVU9reFVRWUNtSkFSNHk1VVJQQzd3RllNNEtBSWVj?= =?utf-8?B?RjlxWDA1cGZWamFGZXhKWEFFeTBoR0lCcVhMSDNNZEt5aTd2UzFXeE9rZ0Vs?= =?utf-8?B?ZWpnQnBDRDFUM1QrSXNJNVByUGNpclRpN2NoTTZueHdJZnhiRlB6QTFlS0lW?= =?utf-8?B?ODF6ZTFQOSsxR1RtUDU2RXp0STlQcktEejdkMjB3VWwvc3N2Y212TGtWUkJR?= =?utf-8?B?VVFQVS9YV21uMkhWNWZMSU9mNW04QzVsMTJGWkIvb3V6Q01ZR2JKRUg1T1VX?= =?utf-8?B?ZVllL2xjRHVmVFdQSURvbEIyZmFmM3dFL2VDc0lhQU5oSER2dGJnR2FtWnNY?= =?utf-8?B?UUp6Vks3S3p3blFrMjV2dnBNbm9Pakt4a2FQZVc0dEFnSS9PLy9SZ2hxZVpZ?= =?utf-8?B?T1JQYlV5RTBZVGRDLzRwbVhlMGV0endIMFBMTjRhanF2QTBzQTNIUlYzYVFU?= =?utf-8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WtMSWR2VFFoOStq?= =?utf-8?B?TEtQVHRta3k2VWo2WC9sa2N2NDB5QktGOW9rRHRJcE1qOHlSZmpteituRzRY?= =?utf-8?B?ZnlxbmsvZzhFWWNxdENNWSs2Mk9GNnpvYW9hZk15TExaeXdNZE1ZV2hmd0JP?= =?utf-8?Q?y3++2CcF+XXDYr7USuZ?= X-Forefront-PRVS: 0340850FCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39400400002)(39450400003)(39860400002)(39850400002)(39840400002)(7736002)(42186005)(6666003)(47776003)(4001350100001)(66066001)(54356999)(7406005)(8676002)(81166006)(2950100002)(83506001)(50986999)(5660300001)(53416004)(305945005)(189998001)(25786009)(33646002)(2906002)(7416002)(110136004)(38730400002)(53936002)(54906002)(4326008)(9686003)(76176999)(50466002)(478600001)(86362001)(72206003)(3846002)(1076002)(6506006)(6116002)(23676002)(230700001)(55016002)(103116003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1139; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM5OzIzOjBrNGFNSDY5MUVjUmpkUWpQbWtIc0lMaDlC?= =?utf-8?B?NXRXd1VRWEVLbmdHN2IwL0wrU3pnQ2VmUGx5R0FDOGQ0OC8vU1IwZ3dNVWNn?= =?utf-8?B?U25nazl0YVI0RWQ2Vy9TZXhqYld4TUNjcmFWT0NDOWlKQW5VK1VDcHcvYjBl?= =?utf-8?B?U0UvNHFhVlhOK2R0VDY0eFdKN2RJb29jMlZZWjZxMW1uYlpBb3JnQVFreG42?= =?utf-8?B?U1BkL1hpODBOVEJ5czBZSlJ6Vjh4OVFTdmNjU2NsVVNEZ00wRzZzUnNhU01V?= =?utf-8?B?cFhZS3FZUkRoVXZMU3phL1lmOE1oYVlVT2xsRU1EbUE2UXBuUjN4OVRlcTJQ?= =?ut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ysGxxbx6VnXivnxhngDs0i+oe1JVnsm5hsCk62CkwzpMZPTu7jITGl0k2hyg9buB6CaNvEIy42PLmrHx7WIICjHXU/KNb1Xtj2E/VbiK9e52fFVbuQb3PV72LsNE/mlkv4UHnt5/xtqHYvF11Bu8/UI4IHK6kL/dzLqKME/sNFIvYNQIb5sDSantoHd013Y++WAA2bIgYOsdZj5+2a/XwK6JGij/pO8C6HOq1H+pTVSsESPq06NyM5uD98vpjap5Vi+qmglpdXIGbZDOVeE6UdmtLC3lfumJanP09jpC2fQdJ+/BaHrLivzZNSaGFOwxMmtWogTNwComdmc8jdr6zGWX6jrUOf5Xym2cay/Q6hFXlPSBu7O69vMTeuwk6A6FxzRF0ncdY+Oc3zEUc2FdUwmYAEde6HDlQQ+EgPyMBRUX+5xjX9gymKO7HD+N5RCWUSbRTuoWeR1IltZYPw/fNg0lAO4yoL1W7KGJappWxpP9QyN8YvtegBPx3H3DfYfpzFHfjbUkWwIYD9g7FWBDSL3SE7siUBiXvD+TJxeHDlWU0JlGg33d1ESYvalg8OjnE= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1139; 20:t10KMD1pJrcUwND9lpQB0V0gpHJ11BQCils3hMwLfP7Lx+7+CWYstg4upA2kEh8De9jOTSYDVxuAYcWGJIBI+cdSCLT5yusFDYhjk301IPCGrVRh5F78VIdoEDpOG/98W6R7/UPdwEHGUq4NKd3zmvJoO0UNbv0ypAe1Eet9RBaV9SdHkISREsf0DOPMvGbNILw7UmaSR7Va+F13mj+U31J1bKIU4piiJIpNMo7s4n2YCKtzy+gdeq6ARRkyQMwC X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 18:50:57.1108 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1139 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 v7 06/36] 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 | 26 ++++++++++++++++++++++++++ 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, 113 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 7c991d0..cf74791 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1407,6 +1407,32 @@ 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 + depends on X86 + +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__ */