Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932232AbdGXTJm (ORCPT ); Mon, 24 Jul 2017 15:09:42 -0400 Received: from mail-sn1nam01on0078.outbound.protection.outlook.com ([104.47.32.78]:14752 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756099AbdGXTIl (ORCPT ); Mon, 24 Jul 2017 15:08:41 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-efi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Borislav Petkov , Andy Lutomirski , Tony Luck , Piotr Luc , Tom Lendacky , Fenghua Yu , Lu Baolu , Reza Arbab , David Howells , Matt Fleming , "Kirill A . Shutemov" , Laura Abbott , Ard Biesheuvel , Andrew Morton , Eric Biederman , Benjamin Herrenschmidt , Paul Mackerras , Konrad Rzeszutek Wilk , Jonathan Corbet , Dave Airlie , Kees Cook , Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Arnd Bergmann , Tejun Heo , Christoph Lameter , Brijesh Singh Subject: [RFC Part1 PATCH v3 04/17] x86/mm: Don't attempt to encrypt initrd under SEV Date: Mon, 24 Jul 2017 14:07:44 -0500 Message-Id: <20170724190757.11278-5-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170724190757.11278-1-brijesh.singh@amd.com> References: <20170724190757.11278-1-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: CY4PR04CA0049.namprd04.prod.outlook.com (10.171.243.142) To CY1PR12MB0150.namprd12.prod.outlook.com (10.161.173.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5dc6e81c-28e7-4a8a-e9d5-08d4d2c75a98 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)(300000506095)(300135500095);SRVR:CY1PR12MB0150; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;3:Zq2+RF4NQbYS2+KlnbD5i4ZcXe8HaVPrjRmcMttGHhvwrXOZklVyw3H6iXoLpTfQzm3I+SEApOuup0rS/BHXfIBRDkrfBV16YkouEde2NldGN80JThs21BrZt8eJyBeoqiBVHssNZTK1EEZmug4vYeK9Msg2lAzrYaxioZzO3XULmt37f7dJRnnjY0KlZSCuXLgrl00lDs75sRszM8kCGq+wAyWJ6eSeK7Wsz+1f4kIV0znMXLPSJMNPctlWx4e88Im61iewa3q0/Tz1aM959wmLuyUfW12Q051x/Hqu5fCp74Ptoi1Z6mgRKsvivX5mV2uEZnpIPbJIw3dOnHUzN7N72f+ew9YbjOw5hme3KUUgruBRLESe0uHISU8Iz9uYR2pGUWNLu1wsrbzoFRGe/tCVbdDnzEh1OIsqKYWO6HUfsaGv8C9AHOlWM51hAvHPplYCHhQJdz5cmt6UKcWWqg/WxWwgqT0D7RnqOFGldjLWb4GNbm70jrtLGaW7eJin1kxEs458JTsvuedAhj8p3SEvFgq6yjOWuSs3jcHQzr43y0LWdHgcvVlNft1NIZIKXda1tDm7KrEHHXCLpyf0nzxNCj10B/Ldwh7i4sfOWJ7UqR7f6OjR8YsOBu1+tISFbeTSwi7Uksn3d6Amm9wQqv76m7kwiqRZaySezJsu0v1rPKjUfb3eEjr9cOXqZYW6MBqq8uNVblDp5QRqaM+nVE+2IbwFwgOQjPtKPuPDCXTx4F4apqTKYi0Mf9aM3C08XwyNZl/eWIO1d4Cs9rihrQ== X-MS-TrafficTypeDiagnostic: CY1PR12MB0150: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C9T4X9yFeVXWoE9S7W0KsY9lXTj5cR3i+FKer5ZCjRHIJLJ/uXqcsNtTw00QqlZS2+3PVXJ5lbPg1RwcFAMk0V00tZ X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR12MB0150;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR12MB0150; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR12MB0150;4:fNS9xHc3378pnQa1m+qVK0ijlJh93Lq8mTJY9KXpxP?= =?us-ascii?Q?6lLHCZ/I5yNMp0HLH2dVqqNfP4qr2RwvBudYfl66IkH09zvWiecJo2vKE5GK?= =?us-ascii?Q?w7FngqDq8h6wZrnzozKQNZEXNZPX1k3YPfbzVWQ3buAslhcI1bSQ+n4xN+E2?= =?us-ascii?Q?FXk3hvfOLDjKC9cZSxphpdyIfQw029TU0rp/EZar+YCAMnvK6+pQV383bOps?= =?us-ascii?Q?bgBH3f8zilO+vE6L/xOzic4FUmIDDJIstgTKAwW6BEXIXV4WdLYZGcmWAXyo?= =?us-ascii?Q?iBPUgZ49cBWWCO5SxyT+z1jJd7hgBuDYzqAr0Pdi32nsRIzBVO9EqfGlCLOE?= =?us-ascii?Q?wq0nLUr8NwLD6WfssTRA0xE/D/NpmvklnhIbDmuNo1NMapn9KO0UJZGyA8GY?= =?us-ascii?Q?iE9QPypZEN/Pv3068GIhmmuT1/1tY+d8tu9pohO7zVwW5oGqknmUlEhBzyza?= =?us-ascii?Q?3T503ay4bKjgC7R9cZMVxn7CFI5XJ9Rqr9R3qTjwZgxVZkBzmQ/+Cz/5ydJI?= =?us-ascii?Q?vFk8OE/3gWZidotL2w2/3I0zgDS+zDNrLWDGI4q/7298UksdMI4WFw+5D38d?= =?us-ascii?Q?MTKI4mQ49dz6t+hip47WLyz4bV8Pecui0DapTfODLRvGquEZk4ixDPgbh+PN?= =?us-ascii?Q?UZq5PKo28p7JZChYln0yHl/NRcTy0DVEyIbyG313tQ9Zk5DQDz/go7u8YDNa?= =?us-ascii?Q?ukbh9kYXghtX/tJyyaRni1kiv1C0EcsCsPQt1HrV3Zh8qrI7yPsBXTcdhH3U?= =?us-ascii?Q?UCbUXyogq5xGlaA3vYXYjWn61ZaXe5qH+xzf4a7VSF/yv2msSGER4sxh5yUh?= =?us-ascii?Q?LMjhJiCNRAYyWPafQUxiekVeSRAwTS9dFoO87jKqYTIFBmWHzYumzNCmv6Gh?= =?us-ascii?Q?ewkOM2Z1+fPDJLfmnMEBey2I8v8MBdTVJvIW2XUMnOGznGtaO9f/eDU0ZLcD?= =?us-ascii?Q?qK8tLaNLLlaDQ5qZk750u6U9IumJpvYeot/pUjWkZ/Z3WvFL0YR/YTHBsog8?= =?us-ascii?Q?kIWoUBCWT/N3qfL7dYJSJcU2w9c7bEXnb1tbi5qEv86QyMol74trmm+0wwqU?= =?us-ascii?Q?KVusP93OZQ6sHkXNooX2HO40Cc9NNW0gMRK2Dc3es6T6qiD8OQGYoZ8qUgqj?= =?us-ascii?Q?L/DsJc0f3uV66YB+2LVEgMr3VWyayjfRl/EwYZ6xyVeCi1hnvKQ6Yw3Cmbsw?= =?us-ascii?Q?KeSPw9C4KllyUQ04hVwPs5jhiTYLTGgtRK?= X-Forefront-PRVS: 0378F1E47A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6009001)(39840400002)(39850400002)(39450400003)(39400400002)(39410400002)(39860400002)(199003)(189002)(4326008)(81156014)(7350300001)(81166006)(50226002)(50466002)(68736007)(36756003)(38730400002)(1076002)(110136004)(53936002)(6116002)(25786009)(48376002)(575784001)(8676002)(86362001)(305945005)(54906002)(7736002)(2950100002)(6666003)(50986999)(101416001)(47776003)(105586002)(5660300001)(5003940100001)(7416002)(33646002)(106356001)(66066001)(6486002)(7406005)(97736004)(189998001)(3846002)(76176999)(2906002)(53416004)(42186005)(478600001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR12MB0150;H:ubuntu-010236106000.amd.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR12MB0150;23:5prExWenODGgfaO+hRPKzfBgB9dOdZCZnI2BuWpcj?= =?us-ascii?Q?5SxmDiPgf4H1RnrmufnE4dpU3hMfeKsx0ZGFvflvhfIr0/axtvtxOabQcc9D?= =?us-ascii?Q?7rjp5SgwBMpycnaAGYyleQ3Qik7P6HUwmqcQNlwece0q1qamgC82Md4XACkK?= =?us-ascii?Q?woivFQVFSjZLyq6GY5iGWPbbvKR9DcPX3hLnprvwahTbhRry9s4HwrEd1y0m?= =?us-ascii?Q?w1Q4AcUazxz7j7M8R+IWz6EmdDFax9ReGkSUjXBGpPCDSMp7UcFktL8U4N5b?= =?us-ascii?Q?HFTsVDMpXxySU58UnHE0WN7z4kIiCKeYkIytowvMukJ+8owodBN0kHQucDqm?= =?us-ascii?Q?ftkRtSqcZuuZhCUxW3K1NjbLjLHb2r1UXKxQ0j/CDCgrDOggaacvXtaRPzZi?= =?us-ascii?Q?APLcXh0vM/1A/jbc+7yAH7FmGku3yUVrxq5PmrWxQofQub1BIJQaZ7GTBVzp?= =?us-ascii?Q?RK+pCATFFP+JZImiaIX0x2Rh/JMXFJmTBRoSb4qyitNkIAQ4asMx3l95uHEe?= =?us-ascii?Q?/yyWOQk+UAF9lvwfidVoDRZ4QNp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ywh4mgmmq7sB0xeNrcetKPDq/edkj7H5?= =?us-ascii?Q?tswK93Cv6FYwVReVt7o+XQP+A5uWtqDNSzp5tGzh2MJo+cV8zFo3y/dfJ9FA?= =?us-ascii?Q?vL0k8UEHmz00ak53+UEq7x?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;5:OITdYuSamPMiegyJjPyhknqZMIDIrWeQpY4bJMxpMktql0aCPEzW49frkDv0WC4raGK9CxJyuIIta0MAWA4SyGUvZL6cxnKtcb8CNxVQ4mJWf+MCEzlOp75s2yr0leHHp7ogKLGGvgN7UMazCawoZAqAo5JTvZvJrWxKtY3dBeiCivP0iMk2ua1WQnECn9pbW5Y/1e1xglK4Tk+JXJ/3e+cAYPHvOy4rax5y7Qs2G0016JyiGfJVYUjpYqZiVaQDeeS582x5404uB58mu0a8ko2NcQr0uRB3oz/uHOv/uYGoq0gCh8PNi3W3rqxcqK58DBR0dJ0z6RtpYNj9V5vZzq23xzFr60LN96W8jZhZJv/KnvtVyli2AQaCVt72BUw3oR0G0S/TrcZk+PrKJKYa2qYfsOHgTsh2jNQfKoGx617wnqPi9KijV4a4QJoGISW2JSQPpkzqBr6GY4Am6FZpuFtwBc5vyeYrd1kEhseO9XVNKXvDK8nP/QwQP1pUT7+0;24:Rgq9MBZEL/IxVngadxkMpgU9IM5+ztjtwbERRO4w0j3FUpOjdjtSSE2o10+otBLb4lfbtlb17sglzmviJFFp1z18RM3wgKL1ewnd4r6DFS4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;7:LeMJDTflnIt/zSfjW0+nEr4UIfhzn125QEqUA54J1vIvyzuOYZo0he7AeAc0KZpYzf+DphZNjyMV9y7Aj+tb69Kvl+N7JBE6aW0pPJSRJtaON/vXigub0ZDSnjXcKXBB9dXkVNtrLx0+qgCIo1IRTKEEt3nsx9mE5wZQvmZjGmVpSzGYpOtD/S7VksybZ/S50MYSXVS2Pgk6uzuIsv7HFUZHlRti5DWjC3rvnNJlWRmBZRWM4fHEZsUHQ5qo6NS5fvjrdFLCZXPlvKND8ShfXDGBxATXBNzozDDJbjn9DV68XwDlztPjdibYGCydEN0HxNR96+0bFwkOgXrPTl9LcGMn+w4FLVGIMH0rb3fT1ONp4VJcabStecYJRqz5vqNyFp+D4MVSF7V51+NB2QuQHwBk3tqMN3dA96AWhx+wKIA4rb0nbInDxmWdI6eJENK0UBDZksgmZ1NJJes7cLpYC2qwfHb1alDwRsLBi0CRvrKueBDG/XnC4bNbfmX5FqWBHlAHfkGbV0Le/A6D5X4g4Hh/8PZ83fpGEFFJ3kfw5WMqcM84YlZ7Jr/Q/4NYemgTc9DfXYUVh4+U7xRKv98ZRnQrRRlzsU/eS7LSCgolJPlOkwF8zJDmEQ/awrGuXrA4JcPF+NT4KdocPUo4w1PUU4M4nVAvJNiDFRWCnBK2txrqlO0nMfVoqhIKN3H889y3hj90uGjlZEH4G/G1iEm/Q0C+0MoOSEtaX0SjC2RzQjvfqTyD7ZcItaTUZbFuH3WwVSRqbDqjd1SGD+5V00cMMKGowDvchiXCSUAmzZuxPPU= X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;20:eWWgWyXYFhwE6Tfcy2KKbADoGzMYKxFLPsfSJVemgUhDjFN6D5A9I246Z1VFEGGFM6Ttg2JqvS53I3zP2/fYqhQ5LCmxLoh2Djn5/LYQM0BU8fZYVbqsQYZdZEOjxlcm8pK8I/YRQ1aab63cLrfeR7Jdt0vx/tdrdVlBUFEoehvr6rXXTVQaYrZfDoUFMSXWC1tyPgq/bTmlsG6Ap2l5Gf1QikqCJGQzYeNhkc5R52YNDS0reHMSl3OPjichfKzG X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2017 19:08:21.0753 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0150 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1160 Lines: 31 From: Tom Lendacky When SEV is active the initrd/initramfs will already have already been placed in memory encyrpted so do not try to encrypt it. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh --- arch/x86/kernel/setup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 0bfe0c1..01d56a1 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -379,9 +379,11 @@ static void __init reserve_initrd(void) * If SME is active, this memory will be marked encrypted by the * kernel when it is accessed (including relocation). However, the * ramdisk image was loaded decrypted by the bootloader, so make - * sure that it is encrypted before accessing it. + * sure that it is encrypted before accessing it. For SEV the + * ramdisk will already be encyrpted, so only do this for SME. */ - sme_early_encrypt(ramdisk_image, ramdisk_end - ramdisk_image); + if (sme_active()) + sme_early_encrypt(ramdisk_image, ramdisk_end - ramdisk_image); initrd_start = 0; -- 2.9.4