Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726AbdHJNDg (ORCPT ); Thu, 10 Aug 2017 09:03:36 -0400 Received: from mail-bl2nam02on0075.outbound.protection.outlook.com ([104.47.38.75]:31368 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752091AbdHJND3 (ORCPT ); Thu, 10 Aug 2017 09:03:29 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Subject: Re: [RFC Part1 PATCH v3 05/17] x86, realmode: Don't decrypt trampoline area under SEV To: Borislav Petkov , Brijesh Singh Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-efi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andy Lutomirski , Tony Luck , Piotr Luc , 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?B?UmFkaW0gS3LEjW3DocWZ?= , Arnd Bergmann , Tejun Heo , Christoph Lameter References: <20170724190757.11278-1-brijesh.singh@amd.com> <20170724190757.11278-6-brijesh.singh@amd.com> <20170726160304.GE30471@nazgul.tnic> From: Tom Lendacky Message-ID: Date: Thu, 10 Aug 2017 08:03:12 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170726160304.GE30471@nazgul.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR1701CA0014.namprd17.prod.outlook.com (10.172.58.24) To MWHPR12MB1149.namprd12.prod.outlook.com (10.169.204.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b3a7e7a-66c2-45f7-9cfe-08d4dff02e23 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:MWHPR12MB1149; X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1149;3:mM++B0oYUPS3GLo8MPeU+RacXlddT5/SUiazELVeQn3k5NleM572nlswIpCJqzJBKInI0glX7rhL2jGItObZ77FSGMkI3nJ/SKn4oEqnenPaBRTmRN2xBzfPl3M638mO095aap2noT/G6b9QIOv5cXAyb71JLQJCCm2xKUMsbWtU5lDvsJKkfU/gBV03gCMZiFOrf0rTLxEmNjgOC0FHMJWQcRfUIBi4YsaTOm97n3+/aH9IdrWx35ZlBLg77lz6;25:ChdcZio4NFfWf0R9QImYKpuzWmqEysAZ+ORzUl6/8+7G5adYcX1rEVbEB9tGnD6+Mds+Oua1o/slmeJaNgxRPL2XTrJALoU+rJYmKWtfD8AAMcnHcTGYObb+HcMjUBzM0uVvWg58VfiRUpFcOeFpD80evVVqsOih9o3AJnjxPqS2HfOtWTWllf8StWYf46ar+q52pD1/d6YK8HPrU5sddCJ36WVbNgpfXaj6bp6XQBn4QC8I1QfxnzjstCZB/bRgXxeCM8MpgOBHP9d+68awg7gLsmNTh9i+TepRVhvj7kR7Ijp5TQnfRQ3fGxSwRVTI2jE7c4NOa4KtmhfIFsSjJQ==;31:hc0nOkjkMtl/m3O6wLVSCeAND1r+JqM4iRuevk0Rr2/BltjfQItQBWtn0WlkrD3NwEZulaeybpD5kxBgtfyPyNI06HnQbwl1lQFhg3IdywnrzA+2E0bZGF2tvakMF/p624M33tWR0XVsgQ1kLChuxlwibbqvoSYsfkaL8ydnRzT8dc6FE2pVrYVwKp9FTsKeqxClSNCkubScGngJAd/yHimnemBewuWoWdJGmBpvjUU= X-MS-TrafficTypeDiagnostic: MWHPR12MB1149: X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1149;20:mt8aT/QA5D+ELDYmAjTzFTc81wNIVE17rUSUEO9zyKbM+wQTTvoOmfCPFVvqJ2CKZqseswyHgJtRT1ocSuQUny1LZaYVRK+q0UQZofqcxHxwRrKPimS4B2vqs9otK7xRJxWh3msgdjuRIDNT1ti4s7e0VCnO8fpGwa0UauBanBUgKKqDoUWFSYaUMjvzswEF2asTw98RKIadjdmj5XNOcIe9pLn1BnRbrGyfALEVr5hNxrLV4EmfkGOqduCsSAkQ6/Nm15oDh/D4dafOFQ0jJI1vDFn7Q/hznJqdHNlEyA2oOkJDG35aoKDMSc/TMBVczVxNPLubpRk/Q0FN7iFlRCyRp84sb5ypH3PS9WrmfFbSc7xa01ZinSzM0qejwyT0U02XMW3YJMBf2biO4QXQXknvv0MpvooT8Z7zPEmuFz6jfg4/PjPK94uggDtFiAidXTRJ6yTDI2rvnN8Jo0P300pfzPIH0B1jdXpdhB0RYgjgrZRyCWbvwrymzldTL/Ad;4:RJmZ1jfEIDGS6xLelCvvUa+0Zo+3WZleth5DzjaiY+Utc8csy2F+lOthxWChpj8LNW6zXlfg9rQkbJN9AG6Di96a+XGY+fBRLsaNqJVqCfTO7LBba0K6FGXyAK71XOgzHfRbmzvquU5Bop5pZ4ysFnE8/isjfkPT+Dn4e8yVJt3UPTffnmaYJmDI9WJY+wddT2QCJEicwBc5vCh1c2XQnDFGfYTYroAnTMdoaI2zhpuUIzJdSbwB8l46FjXUCLqqWeXD+nX1Dl98Poh9Qq1aL9ISDGoko6ICA6LA0LmgIxc= 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)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123558100)(20161123555025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR12MB1149;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR12MB1149; X-Forefront-PRVS: 03950F25EC X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6049001)(6009001)(39860400002)(39450400003)(39840400002)(39410400002)(39400400002)(39850400002)(377454003)(189002)(24454002)(199003)(54356999)(50986999)(86362001)(31696002)(105586002)(76176999)(65956001)(66066001)(65806001)(101416001)(31686004)(23676002)(7736002)(6116002)(47776003)(305945005)(106356001)(3846002)(2950100002)(25786009)(3260700006)(6636002)(6666003)(42186005)(229853002)(230700001)(189998001)(54906002)(36756003)(38730400002)(6246003)(6486002)(4001350100001)(7350300001)(478600001)(64126003)(53936002)(72206003)(77096006)(81156014)(33646002)(7406005)(7416002)(50466002)(68736007)(81166006)(65826007)(8676002)(5660300001)(90366009)(2906002)(97736004)(53546010)(83506001)(4326008);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR12MB1149;H:[10.236.64.250];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTQ5OzIzOmtSeG81WmZkczhsVDZuak1IeDZ4Nmg3Zys1?= =?utf-8?B?U0xScmZLaFZadVZ5L1FNaEVaN1VqZllhOUhOSkhHNlNxWUpOZXBxMGZpdHpL?= =?utf-8?B?alFmQXQ0TFhJc3ZiT2RJT21n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:LpM1dJbAgo0YEOpymTFmR7Jpyg01lTuHSIxe8PrbiC6NyOdFKcaSdl6NNrKkniAbvXYqi41tSq8VjciG0GbLmoeTr+wV4Z5ctx7NYsupWRu6ZAqZ6MwayIimDu5V5ns4WzrzJfHNOZEAuGUWOZ77aDsiGaaEn/a2Gjmisa/qfdRX6jWuYJEkbrOjD66V0IkZEOMHBzhhBvjuAnlpbj214zwVGHeFlF1BCGK1u3bzO2U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1149;20:8fwrx0u4QLEzGVZBbuplzSzua5GO0x3BbRB8QLSabNwpjvm0f7IaighEIvt9JHiO8JZon9hSTs8zw90UAdKLd76qoyyNirfX2DHolMvyE+C1JbqovvV27WZVVy8ZvN3EenEosNx9975pTXxdYrgDJtnXZva5X+w98cOnAQb0Ir0ra/J1ZjudApyZuzq4MuC8YOUMRPj1mtAjf3i2O4vEDk7/129bliwTZcHzNWutk4ggCXUaQ6eZFaZlcEAM6yW6 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2017 13:03:18.3438 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1149 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1144 Lines: 40 On 7/26/2017 11:03 AM, Borislav Petkov wrote: > Subject: x86/realmode: ... Done. > > On Mon, Jul 24, 2017 at 02:07:45PM -0500, Brijesh Singh wrote: >> 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. > > Or simply say: > > "It is not needed for SEV." Will do. Thanks, Tom >