From patchwork Fri Jun 16 18:53:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9793275 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 1B8BE6038F for ; Fri, 16 Jun 2017 18:55:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E6D726223 for ; Fri, 16 Jun 2017 18:55:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02A3A283B4; Fri, 16 Jun 2017 18:55:30 +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 88F232865B for ; Fri, 16 Jun 2017 18:55: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 1dLwN8-0002sm-K0; Fri, 16 Jun 2017 18:53:30 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwN7-0002qB-7R for xen-devel@lists.xen.org; Fri, 16 Jun 2017 18:53:29 +0000 Received: from [85.158.137.68] by server-16.bemta-3.messagelabs.com id 32/CF-29088-82924495; Fri, 16 Jun 2017 18:53:28 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1WSfUhTYRTG9957d72Zt15n4mll01WY0qa2Cg2 CIIlVJGFUGJld8+Yd7EPunbKgSMVZGVFWFI1VrpZUEEVEitIHwsxEQ5SsSIIskoYjzOXog2iv W1///Z73Oec574HD0Ro3q+VEl1OU7YJVzyYyUq5+gyEru6g074ZfV+CfvMqsQ+ZA13dqK9qlt tgrHK69aqnlVQ9TPaRxhc8/RnXo5dxmlMgxuJGGkDeoJgLhMwhuvThNE6HBTRTUTQZQM5rFsX g5jITCFOEUXAJfz5xlCM/DrRSMncOkgcYhFh4+62eJQeGF0HrlGk2YwUvB62lKaEYcx2MzjJ/ mCM7CG8H9ZiZGE3098jUyw6l4EdwYblQT5nEyPL3wniHlNM6G25255JnGOmgPeWfCAWdAeyTC kh8APopg5O2HhFjmEvBMDSbEitIhMOBlYpwDw1MTcd4C7R8jFMkHvBj6GotjeAjGP+yIRfpo6 L53goqJsQToariH4kIN4+FAXNxnoPNOT3yaFS4PNKhjXADHfT/iRf1q8IfH41mnMPivu5lTyO D5Z1XP31U9/6zaiuibaJkiyrWibFixylghW6okp02wWA35eSajTVQUoUq0ChWKcZ/DdhdFb+K wSoU6kLu3uBvN5yh9Kv/p/fpSzZwKR+UBSVCkcrnGKirdKIvj8JVAwzYtY3fYRT3wY1lFpZpk WawSXfst1uiN/a4ELkk/j69cErV5pVqwKZaqmNWHMrVp/APSh4kh1dj/tP2+ziGUrk3hkUql0 iRVi7LN4vzfD6I0DulT+BKSkmSxO/+kB6ODqejgksF1ZLBT+Gtp61DZTV9H/0C53OMzF9Z4ez OS3tH3X2NlgflBZZkstXw5VmsYaWty85tZ0+suXiq59MSXe/VgpslfnZgDbZtcbRdHrc7R9RN LV5YHL4JpYqf48va+sqJMneuamyo2Tq+1717JKmuG97y6u1r3relk4aP68OT08xOzR+tDn7f/ NOkZRRLyc2hZEX4BPYtI1JgDAAA= X-Env-Sender: Thomas.Lendacky@amd.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1497639205!50554558!1 X-Originating-IP: [104.47.34.70] 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 19234 invoked from network); 16 Jun 2017 18:53:27 -0000 Received: from mail-by2nam01on0070.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) (104.47.34.70) by server-9.tower-31.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Jun 2017 18:53:27 -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=7dTuQH6/i5RUPeh9qhxg9sr3q4tSK/Zn+CR+oqCsubc=; b=OrNTwEIbvSl9XHHxk7aNnf7wZsqziGvX2P4dlYDK1g/289yLCJw63Q0dYIT4oUPNQLDdSguS0fCvc1imT7u8LYwoZqAOFntaqAL5dbVLcdL/v5YpxVNRRziQucGfk+4+UqWC6zEdxnmdoq8WnBnl2ishGFNJYgC/VEhBUHmRe3I= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by DM5PR12MB1148.namprd12.prod.outlook.com (10.168.236.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Fri, 16 Jun 2017 18:53:20 +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:53:17 -0500 Message-ID: <20170616185317.18967.99499.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: DM5PR19CA0014.namprd19.prod.outlook.com (10.175.226.152) To DM5PR12MB1148.namprd12.prod.outlook.com (10.168.236.143) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR12MB1148: X-MS-Office365-Filtering-Correlation-Id: 557d8509-2f46-4a46-276b-08d4b4e8f561 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:DM5PR12MB1148; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 3:KeBvg/3uYcuz0lZVsKfa5iGFg4MruSWoxxbo24E0Bx65QzZ2PugyKAYSJGR5R1UZUO9a9n+IuHsKzScSVdakSV0XtDpOYnkRZzRrLkb33XFzQCYfyPn4SbLFpwdrD5F+RsUSy2t5L7jj9AcbU+2X/5xlaHItU+JcIEjpNAOU9JKz8Kt1toC1v68/ikNXSpStojqu3BKfdC3he0+Nl0NRqGAuWqNlOIlCmR1htOF5iOpj9P1iwUCFypbRkn8z4bU6fcAU7YSjBncW08vEwWtoXnH53BzsOGsXGQfEDp6S5lcue4CPYxls5tqvRhnP2dyHIy0qJ6Z8i5Rm+TNDJD3lTjikceukRp6mF46BsGQi6sQ= X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 25:ruyeJDX0U5U20R5pZ0z4bwZyL38y6wIBMrENbIfbLEmEh4xNU7LYV9fX8+7qZc8UNE4YvtIRoARLeAOUOFVEyQTWelHJRBuZfZwHWvBgOs4tA/B09JA33hQAox2mfVm+fLkqvOho//JFMGQ4B9JMLmJ6ekQH1aCNOnD7L3n1DKxEH7vlof75d36SZOTDObDjmv9AtiWp+cxCZHZDBMJLJDzSyIm0X/0NrhBuI+Q3MpZ4/TYiANeaujqbcUTi0pScjjvrDDxjZZMhuDQq9t/Bil+YUiZdkieXC8f6RHJOBzd6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/o8baF9X9cL0ntP4aOV8gp+Qt0h1H7M1oMFWqsIbaI3DNJzZgmCMogXBOP8v2/D+g3CnDWgeQ88qbr+7P0bUzDmJ5Rr52hjSQ1oUhfq5BYj79vqcjcPoas0NLUY6H6RA+KlyiVSLmFPuERKERyklrPhAq/H/IavuAknAUdMofAutRuB2FJWKcNXl01YIj2iW5ov6aonbEbJrv2XhA/Yyd9wqsDF3HF2/GTJYx5zVFEYiz1jFaUgYNd445F4C1sCFr6EFe9AnKKUxg3wPSUNeUTTpm04STKziw= X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 20:zi8hdNQC2JG+e635gJ+LNFmMsmFoSCwUIaqBQcfgkMtovTL2MQDGDkB1RdpaZp1HKSUziUJ06sS/y2zawxEOib4zcKUeQR3Pn49VdIPEFgk2hNnv4h83kv49JsnwhgfJ7iezHcgPVMasgqryZYuMtxjTh9rY+tt7yXEF7RMfR2Wq1VYmXk+2318eNcdDx4gbV/ohtqMRimds5IDp7oHUKQC42i3x6u+7Be2VhUftJmRyksBFFLkcFsIgyj0dS3jRgGz5UuIlLvOMU/c4s7mo3/WELgIxVSFj3thmh6O8wJa1gIIl3yqqLwMuAr4/lE+7HlCgJX7MJBsIXuCcPUPRLw+EfOF077JQ5WStY/FvsOKoZ53SdCOy5sY8er8PUtfsUaJwab8M2IzBv05cT3tjGCcg8rVx3JG5ar32dKd+focaOovAD4smKeycA1+bjudJ0XA+B/DIYG2LVW1QzflzQVtrVVrkBAgW1+dxRzuZ5Co2U52QuAHSymIdErb7vakr 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)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123558100)(20161123562025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR12MB1148; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR12MB1148; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMTQ4OzQ6cHhOREw5N3pPRkNWb0VKS0NDZXVpbTM1bWQ5?= =?utf-8?B?dG5RRm9EZTdQOXd3bXF1K1FaQ3pRTjJHejUxNHRSVjFnU0V6YklUYmIra1c5?= =?utf-8?B?NlpKQmZXM2VQSjBsZzZtSUNGVnVZcHl5TW5DZ25uTW92ZjBianJuaW5FUE5h?= =?utf-8?B?RDJNWEJJc0xTclZHald6Q3JxV0h0M0laaWFKNExjRmRLTzBKRUtzMHh4K2lV?= =?utf-8?B?b01Sa3ZFVy9MUDUrZklDUFc0QkVFeEVBc3BmWFMxRXFaU3N0NEhOcWVaNi8z?= =?utf-8?B?clVxeUNOZlJDQ2xTcm0zeDc4ckE5ajZoOXM0M0llVmxDeUd2akhSMkF6amZv?= =?utf-8?B?dTIrb1VzSWFTbEVNVjVlajlFeWdyZDVvSC9nQmMxSEI3c3hFSGtXWnlFQWN1?= =?utf-8?B?OEZsM1RTdmtzWDAxbG4xZXFHWnZVdmNJRkRrV1U4dWxLaXl0dk9ENG9zNCtm?= =?utf-8?B?NVozTTdEV3c4ME5OWUluV0RCdkxOUVVNSWR4K1p2eXVDZTF3dExCOGV0TnNM?= =?utf-8?B?NUZqRzNuVnpnd0RWcjN0VHhPbVVCRDl0RjJxS1hCRE9YbFJTNlQ2eXU4R0R6?= =?utf-8?B?S1hhOWYvZk95R1dHcXl1MS9ZemRtU3l6NGh3a1hzc1RJcTdNNndRTGlVYUJD?= =?utf-8?B?TGs1VFJiWW5HcUk4RkpPUWhNVFhMSWo1NVNVejdLUUVVVjNDOG9rTU5ndH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z1RCMGhVcnVVTElQSk0rdTBEK0NnYVl0?= =?utf-8?Q?McLF8ytby5Xyh0Zk0fP?= X-Forefront-PRVS: 0340850FCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39860400002)(39850400002)(39400400002)(39840400002)(39450400003)(53416004)(15650500001)(7416002)(7406005)(6666003)(33646002)(8676002)(478600001)(42186005)(25786009)(2950100002)(4001350100001)(81166006)(6116002)(3846002)(23676002)(83506001)(1076002)(189998001)(47776003)(72206003)(5660300001)(6506006)(2906002)(230700001)(305945005)(55016002)(7736002)(4326008)(9686003)(54906002)(110136004)(38730400002)(103116003)(50986999)(50466002)(54356999)(53936002)(86362001)(66066001)(76176999)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1148; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMTQ4OzIzOmtvSzBIdUx0QkxkTkswQTFvdTBjK0lQQzd6?= =?utf-8?B?enRiV0ZUWHl6OXBER3JvL1N1eDhjN0lmdGM5c3o0ZGdMVlZWUFJreHBxYVdL?= =?utf-8?B?WkJMeFlDbE8zcVRVYmJWbUJHR1E4YjBoeEMwYjFyRHJLV1JMc05PUTBlZ2ZL?= =?utf-8?B?OWozNkREaHYzdS8zemZHREFYZWZad1RjayttSU5OaTVwUFVmb1JSaWZlSTBq?= =?utf-8?B?ZlhoaWxhWE9jR2MydWpsTzVrc3NxYm5QNytYdHAvUjBwZDNFdlozYTl6MVB4?= =?utf-8?B?UDdZTmVzYng5cmYxTDJoeU8rbWhxb2hGZ01tdnRkd1FYcm0vSUtkZ1JudEhN?= =?utf-8?B?Y2lwakdLd0EwOTJHM2o3SmowUGdRbTd4S1BENHJyalJCQ2VuUllYcGcvSktO?= =?utf-8?B?cnFGV3dRZGpla3Q0UFFpL3phSUI1L21zZ2tMK3ZBeEdsNGpMcn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-8?Q?rfMxl/4?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 5:3QfeQQ+21p/T5dixbiT5UNDf2CwAi6gaDNkLdegiYW+u/rxvTPBMfMm1MLAZHpvkPvfA20eXYk6qkN9G1cumcsUf+UkNgRml0Ak5NlRNoxPo1LXRrzKwF3VuQN3YROkviCF0cTdlrWtEItOpZgIcMhGVtpa6hyy8E5Z5xavN8zTZeshYm8pbD4H8jVd7UpU+/uwlxJ1nodwuOiGACgvcUNtMimCRllAgArJ4K1pJQEBp1czCOL1MaBgcdT5JgIGJJ+s5CpOp3RFl+CgopDgWT/ho29Zl/DDudloN9Vq6RcKMOZPoYn+y9QicuJWzjjUOEmKJo/fDs3J/PsZZHiix6GcZrQawHlMWPM4+YaPwJpUdxiAkMuXktob/5+DjpT+w2higDvmxhWegfHj7mxxQrkhb/XPfeMOrf+oVUFEBsws98ITYusvFrCMdZImEuY9GxJT1k74y89RSaCI8SZSZ19kN/0UCfGzHqCOf5/hBT30/1eTBjZPhI4k5LGbFO0HO; 24:9z2zUbdvUM0C0pLfSF9icvskDt4ql7BIqWZ4MeGQtmPnyxG3C5dS6yq1nx9Heq592LuLgBW04U/0BVxnGCi9fxZ5uVwYzQOi01jlhorz0i8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 7:cQb84+X3FaeWcfx61XVx31fDZxT5vH/kWfRpGloXkKqMSvnMdCN0mZWVCIaWxulCq7Xd4YPo/S7mL69e3QvR/52We3dmyLOnMTKOw1eRvh5E3J6ZqqPhNOsANXC2EWNVJDv32ELhjNSwArekbsc+dLhF+DlP4RFMYJaEKyfTmIwUW3EdnLmRuwAP1kglUZNIeACUge3MXJAuCfUCwcNQves01c6tEFOY7yi6UnHrFIG57nNRbTwGgCS4Zh7+RsULgYICGG7ifjKRen0BmfbNYxfVmXtR+cCOEIPjuJ4IN+HXxvN1AZyWk71rxP4/5QAjGwIlf3etVZ7o35nZe6NTEUkTd2zoF8UFmJsh3zww3GK17Wc6vIma+VprXaS42dPwbnxqWVHAv6bkHk4KqWHB3SBFGfVBEmtNUYwNgTjX+c1sQj2CgPEjUBEUcCMzHI7182rsKK1ObTSqn9AvD+ejsNBbXXVaWLFi7YeB8wZr2nV6BJ4w4/gn860WCbfl1gT2NGYPT/Yv4eIiyeXE8RhxfoykCQHpBUXvgDw/ICyNYG8olykIr4QYtIWc34rvxJPLMT07G7mAYS9VgfxP5kYX8hogsYBO035fqmHQdRp/2WlNAbqyVIbumUPaW3dVgB1+LRfKdRvFOKZ1MIpv6JDDf81oD1PYJBejaX4Powl89li9yzHl7pefxDS+ijDLP4s41QsLaPaIZR3Umgi1wuhb1LZKOb92TNupFDQL8xVRhWl7v/c7DPnJmEiPXYImWwiqNI24pt0fsZQofFqLdLNrQis14MAswXNZdSuFUbsYN+c= X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 20:YR2lJHl2befbvfZbVGN85L1DgPbYCaGbNyoYpUclqPyS47X7mZPh/xWsV/o5sonQzzDR0OrBbibimb8Z4K+ot9kUkaKCeeHpbah0GwT1Dc5XbDaIYWQddfqLWMl1X9aFDuGyefCekqLTfAqDz2hda7PXJodc37EHptPiHHwXAp0rsPripDC8PRyzOPGr1oi6uy/YUBFiimcRnM+8sC2xBzMPN2mjRBPp//8m8QfN3tyvqXEgx90DU6b+f+Is+hph X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 18:53:20.0467 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1148 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 18/36] x86/efi: Update EFI pagetable creation to work with SME 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 When SME is active, pagetable entries created for EFI need to have the encryption mask set as necessary. When the new pagetable pages are allocated they are mapped encrypted. So, update the efi_pgt value that will be used in cr3 to include the encryption mask so that the PGD table can be read successfully. The pagetable mapping as well as the kernel are also added to the pagetable mapping as encrypted. All other EFI mappings are mapped decrypted (tables, etc.). Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky Reviewed-by: Matt Fleming --- arch/x86/platform/efi/efi_64.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index 9bf72f5..12e8388 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c @@ -327,7 +327,7 @@ void efi_sync_low_kernel_mappings(void) int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages) { - unsigned long pfn, text; + unsigned long pfn, text, pf; struct page *page; unsigned npages; pgd_t *pgd; @@ -335,7 +335,12 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages) if (efi_enabled(EFI_OLD_MEMMAP)) return 0; - efi_scratch.efi_pgt = (pgd_t *)__pa(efi_pgd); + /* + * Since the PGD is encrypted, set the encryption mask so that when + * this value is loaded into cr3 the PGD will be decrypted during + * the pagetable walk. + */ + efi_scratch.efi_pgt = (pgd_t *)__sme_pa(efi_pgd); pgd = efi_pgd; /* @@ -345,7 +350,8 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages) * phys_efi_set_virtual_address_map(). */ pfn = pa_memmap >> PAGE_SHIFT; - if (kernel_map_pages_in_pgd(pgd, pfn, pa_memmap, num_pages, _PAGE_NX | _PAGE_RW)) { + pf = _PAGE_NX | _PAGE_RW | _PAGE_ENC; + if (kernel_map_pages_in_pgd(pgd, pfn, pa_memmap, num_pages, pf)) { pr_err("Error ident-mapping new memmap (0x%lx)!\n", pa_memmap); return 1; } @@ -388,7 +394,8 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages) text = __pa(_text); pfn = text >> PAGE_SHIFT; - if (kernel_map_pages_in_pgd(pgd, pfn, text, npages, _PAGE_RW)) { + pf = _PAGE_RW | _PAGE_ENC; + if (kernel_map_pages_in_pgd(pgd, pfn, text, npages, pf)) { pr_err("Failed to map kernel text 1:1\n"); return 1; }