Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756546AbdGXTLA (ORCPT ); Mon, 24 Jul 2017 15:11:00 -0400 Received: from mail-bn3nam01on0045.outbound.protection.outlook.com ([104.47.33.45]:41632 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754974AbdGXTIr (ORCPT ); Mon, 24 Jul 2017 15:08:47 -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 05/17] x86, realmode: Don't decrypt trampoline area under SEV Date: Mon, 24 Jul 2017 14:07:45 -0500 Message-Id: <20170724190757.11278-6-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: 52c9f234-9864-416a-f0c7-08d4d2c75ba3 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:B2rdf8rM3hUF/KJeyJa1LThGAzU1eej1aCTUY7Ba5qBZN7D2D1F8PArhRmo6OA/mKGXLOuvEwehM6D6KsLo4OTzkgDqoQ7zZVJqlAqkzajFdIq6zCvm+k1Q/KySdJDKw4sGfrXODNH6Xy2THOIxhRuzvgSpeQC3i+SYlzlGbnPrljxiA6qoNH+9B045wrQpMvEvLu5rDudLUN0NRHoFi5sYR06ZqwMfB4+7NYiGF5YKeCKIPVX9wpc+uIMJoI1VeGyM5Wu1nLEvGQmgKU+YCVSgp0Sw9jYh4huET6iTZmuCzAWSfvBg3t3/u+Ovi2/PA0FmT8znCcNe76//IGwuCoe5e5e8YUqH8JuCTTDr2K/5XauUAeGqFx4HY221DnKGuvyfsRk1vrscHCT53cOctbnvSrvnSgtFtyBFW7p0nKO71QsNiE6n1Kxj5e93JEjxx/XjK28GQglXwHji2/yZJ3PmoBGEU4vRyw+7MLW+rH+fyX1r+gftzrohAqaeZq9+v3u5np8pc62QpbcQz232Jf58XIEJ4PVI/S1T1mT6mStuvc1w28vduKZszxabtUxfVDVCR0JDk9ecwH530OyTTYzoL9lhZeI7cnjNvF/sFy7b9ypxM6hqfoRa9KT/pclGqVFQ62UM1+Cq5hduwWvDvRK3BVj9m7CIZcPIIqWVJc3pQTMOSJva1USupuOAENoyg9ePlhqqJlUqOPkqKvNp4Hjw30w69XQZ3kDynVyyveBm773XjbIpO/ee9ofa+E9yHHTSQPOM+k0N/mcK472ga9Q== X-MS-TrafficTypeDiagnostic: CY1PR12MB0150: X-Micro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gW3BcPVi4vpS6YnVfDkvMl48O+FSdqmw6RQnr8ZqNp43VmbFCixqmSFe5SCQKzYq6DHj22jLJS39vlWkkPcggLORf6MEhgJnr5D+gEy0gBXsGmR+b1atGLQ20660qMt6Cnh 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:5ye//LyDK1F7xjrA0uAp8GpC2d1yd5fls7VmTvw4pN?= =?us-ascii?Q?ErXv0qWw49gRuTFsHKUiehTwhEqiBasqgjZXeNGqYe4KQI/a2e/TKhRiHSDc?= =?us-ascii?Q?cWmxBawadWYBtAlYYQH2lV4JI//OxTbiF4jk0haNV6owrAwdmahOprF0t8Yr?= =?us-ascii?Q?50zosX4WeT+gZ574RdvGiARW49eiBg6WwjIPJpUYvQQxdxN/KwwdHGBcMTLE?= =?us-ascii?Q?RRrUg3ct/W+6uQMq6HXSnzWNxTLcfJcufiEkPHfkBsmXiuPUtOP+jepwYxVi?= =?us-ascii?Q?n5B4IPm8SvfS3lkNxa/f/cPqCAR/IsIiPlke0kZ/8Z8LeOLce8emjigCPoP2?= =?us-ascii?Q?9W3MkM7ISuSb7kP3tpfpiL5hilzUXLZLQiXJFWkiKEVbSIySxmle87V6PyJL?= =?us-ascii?Q?a6OoPAq9tOlHOml4c/CI3P+XSDb50HJp4TK7lH0vav+lHHYJdWvJXezrKUNM?= =?us-ascii?Q?KVnSkS3CtFZ42fpOh6O4SQNOuAw0yPlHAcAijXr7fvhxH0ApJj6Aln6DYLMw?= =?us-ascii?Q?BA+A/7je/CKzjcbpXF6FhN7whwv//R1/nbN2VqKtO9kThdGpumjHv2wu6z0t?= =?us-ascii?Q?LqnRCUW2fu9urioED7n30CT0FB7/Gqs9TyexqVxIcz2KwFM8TJzL6mcluBbl?= =?us-ascii?Q?wRXwNzjjZhtFggBdmwW9SQ5DmUTWBWMzUL+GP+mPLasFGc3XaJCeckEmD5O6?= =?us-ascii?Q?JacIEL361LQqkspLap6d7f3Q/rI1NurTrzQycHjVwAoO7Msl+75dhgU3M6X7?= =?us-ascii?Q?857B10h4eyXSw8GGNFzmOjROTMRpdMHkhzV5uKASkq9tUmc8VifFgRYAgrrM?= =?us-ascii?Q?jwnU1n+dJTpNL8yZV04ZiRdwiF2lGxfkNiuv8gSFO+/ohNuVV/LdJv/VelXf?= =?us-ascii?Q?d/5xa4s9+jWhAJjMAKirZ/gIZLgrWB7RnJBApKMONzlHwFNoLAPAzSJSIohL?= =?us-ascii?Q?6e01O6dKJ7BU5BahDj9e7uZLLglxKxeK2+Jk3qmjTAxNMC+P4fXLTuTsr+xb?= =?us-ascii?Q?pPxCtTSsLYpUpcsGBB9MpuKR319+pHC1tHxtqa5yOyJdaJAJat8udBfG/3nm?= =?us-ascii?Q?TpD8SO2zlRJY8O2jKViZj9U72ezwieeEtODZ8gia9Hj4gFef9AZaKj4tBjhS?= =?us-ascii?Q?a+/xZahHxl9EkPLE2Dhu+1utA0wk04SYABBUF9wTWJjz6BORH1lFb+55lYF1?= =?us-ascii?Q?eX5p5p0kETli/fLiFshi0qXX84Z2P81wc2?= 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)(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:P2CouMdyXqtbPuGc/DNcQaXMfsJ+r/dXuFkYR90OC?= =?us-ascii?Q?9LiampcXL62eLIRN7E4LDjtk08TYTuk5X5R9OnOFFywZpXxTUNjE8Sg8ntdw?= =?us-ascii?Q?N1pGhONSnsIkovemfx1dnJ7zbnhhgwpBaevPgcyDIRBl2vojx70uhHbErepI?= =?us-ascii?Q?/WL4V9B6nOGZCre39qhmissCy5H2qWzfMrTBwE2EFrh/dw6LeEvMhHJWVr1o?= =?us-ascii?Q?DIR5vXeammVhgBfQcPcgBfcNWVhv0mPxbptpzA/HS/woMUchvM1Hs/ZhXtO2?= =?us-ascii?Q?CUtGyFMfES/TG5sFiVNoyCy6tyuX74IZ5ratcPIzzu30jTmH1tl+5JN8fRSv?= =?us-ascii?Q?Te8KWJPXpD1P/iaw2067HfHpn/DGU0WDNeKQQla31n/8hBupFbesVBY/7g2c?= =?us-ascii?Q?FA4wWZ0GExkPahfICmT3bn87CDDnTKKGTQSMvKAclSjkOdlz1a77lGcWMwFV?= =?us-ascii?Q?i0PN91RLOA73UgSohY3Es08ATDCM4NrABe3jN8bsTknwNMtwkedEw0jSXbyk?= =?us-ascii?Q?mKs4Kxl8/jOFjaw4UQRBhB78c+JfgZ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V005GeGozBMJjfw3z2oS97R5kB/siooGj3G7WGHktwaK+4?= =?us-ascii?Q?o65y5nc0OXfA9w1+yhPCshe0Lmv07blsmJmHt+CSy8UWDKlqVHYtR2VfZzsN?= =?us-ascii?Q?nLYIa6IJmTXT727rhKEJAZ24IuCzgqN89Z5bBIq+pvEjKxCi614Z++XLwKDD?= =?us-ascii?Q?Po1rTxjS7MFOkFjM1IUSSvC5jqfdQYwm05e+8+cMEeT0HjIDllZzxppTjTmy?= =?us-ascii?Q?pnti2ewIerUGUeJITc18jZbs6H+p43ptZ0J9Flbrr0ilExWRWV1q7vn8pNpQ?= =?us-ascii?Q?M8IfOu9DN2EKP9IukIqtcCaqAnA3Tai2SqQzHRDTqOVbPTy/IARyDVhT69Gf?= =?us-ascii?Q?cOmpdptyJvSitX6uuIccxlS8aMsnea95MUimqfQmTMzmGcduYrSb/3DaXNQV?= =?us-ascii?Q?B20UYq/ECgIUNctz7IHRBPW9MQIZBGteMeLsfjm930h0R73caCOqJdZ1FzuO?= =?us-ascii?Q?5UwEsggQP9qkUPe8MroVbEcgNxNqtiDkQHuVkQdPiubBSd1hvVtMPmMfgHFZ?= =?us-ascii?Q?yyYxGD5TWvjnW79A2AVkgkItBdnXMoi7MkIBt6yuaHHwOTXXomxnedbTeu+0?= =?us-ascii?Q?XVNXTkiK8W/NNIMe6partm2eugMjgRO6r3lhvu9N9W1MLXV0A5U3vzyKI/G5?= =?us-ascii?Q?ej+9SqKQoI72Fwk9QCo6ml4cqOm/yhWM8lQ0MZuOr44Br89a24uWAGrRYjk5?= =?us-ascii?Q?Jbb7+ukeaWzwIOV16jpYxJrQRli0wE811bJveF3wV9qnbOyfAKyQ6xobyYNa?= =?us-ascii?Q?g5zMmuiq81vaz8lrXUPJz5aqjLbXSGHIpaDEpM1pYQ3/9znevoHt2VI0XFv8?= =?us-ascii?Q?EWujDCdvmUw219NDKMMFABt2K5UVNXdcb18nWriCjLZJ3dCCPft5BxVf9mGZ?= =?us-ascii?Q?lkrz1pwvBErFDt+84tuYLEAKszrNXGJY4cj8OPR+b2KxIYs2kv/ICYTsF31U?= =?us-ascii?Q?AWyNl1AsqoDgZ1rz7gr1ga?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;5:WpzVbzN2no0kBu32paWjp16NQa72frf3O3P6JTIuTB0yME+qhrDlom+Q2vlBI3gO/P7GPh4iPKOOl5GYjpebmGODoTbsyzZxKTKBVUMoTxQ3cYJRoTlVp8eNfFc60RXS37toHSwkbQ8PnycLvRYdzB4iEGYDyDXklu2fh8MvzGlBXAL+jwZTapNkFChVyXAoVdTSiEPInHHc44F3f9DX+VPTH23fcp/EocoaaOb0bS/KjrPgjVK313HNRLy/crtvhX+S8hwlirAFykz9WIYJQN4pDQimxC1b5NlaKLO2+nLAzo3nYiHKIqbcQymUXAVatroyaprm7GS9Qys9QDUw0e5/m4gW350kQwYwmeRbutjKVBnZtoX3ZLNl9/HhQbtXnJI94RN7aUe42YK4sUSEeDFhbaI2NvbM2jA813/f6VYikReeMWtY13GCXM1lWRY7hqc+LlMdZk6JzRQean3jGMfiwO1QdBnUDrhO3w+Qg2nUeF5nyLXfkI+7Lo9vd7yV;24:oTRI3/wsGTMistc24CUrcRW08FaGQ+9UiSCXepExpXHfHKFW1gbv+ES9NSAE3vSfAe5sxKdNXJUDs+HT6uGZl34COAM5WmmXYTWUw0kAK4U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;7:f0YehVXilXLGnP7HPJULhokO2jcXYLlwCQ5Q8rV01y9rwHf6Dojji3pOsoEw7tXESIEMao86u9w2f1N1b+JYBxJuX0wTIVN5xYS9h+IHbQiNG+jYwPx/Xea58uM+q9zutHCq0N7gaq8AL7frikLMpJ0tWpOqSj7RK78RBa0hIOHJJeUPPHcb7aSEQECjjYL3BdttJ3drHPB3gkW68dm2Wlw+kR5/vUcMSBJlQBUqKeFNzm4vAKh3s2tEfIfSuhmhq3Taz7xMO9R7wyLL5yGHIysVTvohWoKzuwEC4rD/QUzJNHv0q4/0/qi/YVCPqKb6aMl2W2kYu0wuqEwGLXyRQcazdyM9/H2j4R5+BXdeVBzolY4ohYaBEvXPJ/djTJ7hJJIHyJH/RXhcfRMfkPgJJQpggfnTLZ2UWFkDNTpbg6r+aK9+pa5I3A1PEVU0xpFe423/yubt9hS2khHmnQfJF+xLcmxk1+4Fa7sFbIRSaAbcHjhgOQOPf8QeuSkPtu1+CEG1dGE4DpILa2YwAJO69WDv0ZJZ9Hiavt1iQ7PPybAY/oqdLjfF84xrzUXO0c5tExz4OziymrvXjEY7fKW/FhnlJTo1o4T5UyF7M124SJiOVcfC18qhG4dRvNRPIvqIEbYDNUp1hL+LWO3qBwRDi3NG504yS8M+fNG0r8ygwiaJDUY4Z4ZLdDHv/A8g61kcQ/fDMbWINyQYIeq/dHk7uwoJXVIxSYWTscZaMA2CplD3O140+XWR6yncGKQv2Z+MKxcwZZ/h8wgBFI2wp8N5JgL7IJBCQ1VKCht5ta0HS78= X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;20:ujyFjlskNmCm4x5ehXDvO4bbLI/4lMRJqLCZmIbFxwhroCjq4XxRQB3hj0RZS7B/7dzG+y/X5YsAo0ZrY5pBdgtFqxwb+QD97l970ap1j9JiLJmcUtiPMxl68FAFdc064MkQ1HitU79NUC2mrw/lj2xAVWvtgHHHip2lfu8XgnEo7fuOW8mEDWIcYAL+Xl9NBysauq2PqgLVTtUAV2YPe1L8jhVoAoVU9CmkOVjcXQotBbZZsN0DwZH5pa78lfbX X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2017 19:08:22.9190 (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: 1052 Lines: 31 From: Tom Lendacky When SEV is active the trampoline area will need to be in encrypted memory so only mark the area decrypted if SME is active. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh --- arch/x86/realmode/init.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c index 1f71980..c7eeca7 100644 --- a/arch/x86/realmode/init.c +++ b/arch/x86/realmode/init.c @@ -63,9 +63,11 @@ static void __init setup_real_mode(void) /* * If SME is active, the trampoline area will need to be in * decrypted memory in order to bring up other processors - * successfully. + * successfully. For SEV the trampoline area needs to be in + * encrypted memory, so only do this for SME. */ - set_memory_decrypted((unsigned long)base, size >> PAGE_SHIFT); + if (sme_active()) + set_memory_decrypted((unsigned long)base, size >> PAGE_SHIFT); memcpy(base, real_mode_blob, size); -- 2.9.4