From patchwork Fri Jun 16 18:53:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9793285 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 5ECD760325 for ; Fri, 16 Jun 2017 18:56:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50D0B2865B for ; Fri, 16 Jun 2017 18:56:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44B4328670; Fri, 16 Jun 2017 18:56:02 +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 855322865B for ; Fri, 16 Jun 2017 18:56:01 +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 1dLwNT-00038E-86; Fri, 16 Jun 2017 18:53:51 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwNR-00036h-DC for xen-devel@lists.xen.org; Fri, 16 Jun 2017 18:53:49 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 70/43-03058-C3924495; Fri, 16 Jun 2017 18:53:48 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1VSa0gUYRTtm5kdR3Htc1W8Ltpj85FbvsIikUh QwwojDX8YSM3m5O4yu9rOWvajUrEUf5mB1bqSrKkYaJCSmRImGfhk0TKwB/QwwZTMtwXVjLOa fb/Od865594LlyFVJbSa4QqsnMXM8hrag9JHhcZGxIcnZUZ3ruCD93/UUQkopbfzF3ESnVYYz LrcgrMKfUPbeyrvRWxBu7OfLEST2nLkzlC4hAT7Z7dy5MEgfAtB85tKUvqo8A0CqsaeE5KLxn thbGZBxAzjg9PgdXeWRPviWgI+VWHJT+IZGp4ND9KSQOBAqHXUk3KHECh/VbGGlTgF7JM/kJT jjo/C9Q+URKtEunR1eQ374W3QNFqikO3e0Hf3CyXZSRwOD59GSTSJt0P7jH0tEfAOaF9epqUR AJciqJobUsiZwWCbd7rJpiDoHbJTMtaCo3GVlnEqzHbYFVI+4F3QX3JCpq9A0x2bm5x50w0Wm +2k/GmgYaim1RXEw8eBLhc+Arfn6hWyaVAB42XLrvIODCPFK65ZA6F7tcwlVCtgonqCqkB7bJ tWtf1b1bZp1VpEPkC7Bc5ykbNE7IuL1FkMOXqriTXwETHRByJNnCCwORzP6oTIc7mmR0g8iS3 ie4K6HWk9KIAhNH7K718SM1Veutzsy3pW0J+x5POc0IPCGAY7eotPqSlzrpnTgNK4OylT5W3h criC8wZePLF1JzCeGl9ldrAoK4U81iQYcmSpH+1U+ysjpTosCfp880bZ+nGOoCC1jxKJM6k88 ziLyWD9X59C/gzS+CjTw8QUT4PZupE+JTYmxMbpzgSpsZX9J6kLEY0HHi/EOVO9jBEfWx1dQc ZEIrRtceuI8522wq4e/rA/KHH091IIfyh1vCWDrE0d+doy7fjp3vLt+GG10ev7pcqiobp7vHF +tqOPSC4t/ENey2oun2vICFg6pu28MO03eCar8WVUnM4BLfFxSVczdWF7rTVM0ee3tuTwAN7e pKEEPRujJS0C+xcoOmzdlwMAAA== X-Env-Sender: Thomas.Lendacky@amd.com X-Msg-Ref: server-4.tower-21.messagelabs.com!1497639226!68099235!1 X-Originating-IP: [104.47.38.52] 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 7063 invoked from network); 16 Jun 2017 18:53:47 -0000 Received: from mail-bl2nam02on0052.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) (104.47.38.52) by server-4.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Jun 2017 18:53:47 -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=XtIkypWvdA6/Voxn/rXEzcJF8MSDHeq0Fvl8C07RzDM=; b=Wk2hWAWkpHq441Hmi9QaAQThS6GgsvX9iXLQYXk+nTCzkDcQir8hkj3cOrCQF2/glghkHHQucCAg5AWfflDY0fuqj/ksZzicYlLKtyz/Q/zExZzk8m9p1hLmckKjiyreoKJC9m1U0+lakiDP1Xt6rMy/2x6HVpKbdjBwHH0MakM= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) 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:40 +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:38 -0500 Message-ID: <20170616185338.18967.80659.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: BN6PR04CA0057.namprd04.prod.outlook.com (10.174.93.174) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR12MB1141: X-MS-Office365-Filtering-Correlation-Id: 7a74636f-30d2-4982-d70f-08d4b4e9034f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 3:XDazI8XhOBvdmZ4uEZ95e+NI5MsrFnlZ3JW8/80NQqndPUcsJcN1o2ztZNAjIf5gUkO3/j0gcfUA6rTjbqCbd3U+qfb+lomlVeP8brO5YNBVvwh5QJt1z+PnrZ2n9LVHv3Pm3+TEeRi+j4NQZyZg8nK6DgpkxAph0JyRqxj15gvls4MgDt2mT+1l0XgsfuAlji2m5LgOFOJQAhwUFflUTT/iig1fXvFDlLqMdroE5qoA2tGJIWvydJOrFZjzrt6HWpyuRSlAgQpzSbOABZgOrvoqJXLU2UiF0RwcGodtXggVLRkOIXUyt04Q/y6wtJOHoPG+/zjzzosVPsNcew6LDTYugd+a+sYUcTPy1XzcBGg=; 25:rreUXk9FLOvDDA95TAK81wqGcsfQzxFt1Ty8CyBIeJmD7mhubhaLZfvXyWm8n5LVsfgY79guMcWIpUv3kXOVa6ODfiGyXV3e/Z41/jFpcnS314Q6B9s2vQaeEhCV3TiWRvwm5djYP9wtKOMsVeDh2lYByp4mKt6/fgV9enEY1Cyjf5VPVJve0fpWyqw6uq9DB0/+VQDWlhy47MTVeClqtGWUPn6tD0Qtsd/vxC8gsIMEUzAFU2SvreAAH3Ts3mi0IVCAoELZkj/K+3qDzPvENnmV+TCKuo4aCdUtQITSO4Gg3aE72gsoJqNfnfQdBF66xehnqeg7pN6eOS+XQ+TRMcDnyk2tEhgSCLLiO+gFS8VD2hjzmOtXEuVwuXUMxvXWdmwHqHpQpBjNuKi9HG9Bpp6xREiBIsy6g6MyLXYQll/jl8EhqEjWMgMqw+JB55SpD8MR7+eF5Zzgdc51zQ+nq2SRpNvGIUIhg7e9quJWvME= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 31:ifkPktM20jnZudSEojV+QihJwBMaJrIvc7G0N6vjI0HZ5bfYFFG5rGyjReon3+Rrho5w3yoUiK0gHVM7N0RevjTJYQZxsGzAR/oSQuZDNH3aI7oD71aTW70ARNa/YgpnI+3SiKY2Rv8MiHXqLwKzSYBUkbYm6raoMcjuBV1F3+y2STGRRKoADSpThfWI4KojTKIASL+fMrSESs5MTltEfNGKJOUauDb3dCktgilDbjg=; 20:bZL61IYDnFGvKW98oMXvIj6mDisj7IgHjlr+pnYPgJutdTOyKvgFj1dkpjWcSGcy4pWp8EsE/VHBOCI+w+NUUawECj3eZ7/Ik7ecnh/ydJcOQF6Z8T5g4A0qIG8e91fBohuMSmRmvJ1gTSXVxqvC5SzEd9cXOx1WnB7SUfl9WwCIJtMbtTL2V4DzXOxlZfXj1sBHum5EobyT629iu+k4AV2qU0R4fc7PafahhyG3gXUbnmoNgum2fNRvXLttUPsyl3g77drZkrMMjrn9lK8Xzupw38cynVL3/yt1X4oSadObc2KjXjsK9OHXNevUUk19obf4yH4EEhL4EC5WMFOjASbZS6taJnM4jvaKOMs0IHWOASeXjthOsTrj9bse6zYcMdLRIUlwqxFW1op4VzJjL0ebdCOpK+8QNOedEimo2rvTnJj6ssfl7uOtBYLS6hFcTrj1YWV3xhySr7lgdd8/8fvdfQggUUwLYCUHZKNLoYVzl8nie3FY8SyiKhuCRu10 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR12MB1141; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzQ6YVZsdy84TzdneTBxUkxYZGpHcS9oUHp3djlM?= =?utf-8?B?YzJnOHpoSTgzQ3R0YkdNOEVnK0MwSkJaNTZoOExrNForREFPdkJwSGkvWk14?= =?utf-8?B?ZVpobGo2Und2aTdZQTFXYUFmUUM5Z0Q0TU50ZHRLaFJhcGRwcm8rZSs3cmRO?= =?utf-8?B?TmRYYmtGemo5R2w3TDRoOTdLVWMxWUN5MkozNTM2YkExbzVYT2tZbUsrV3R5?= =?utf-8?B?eWVrVDBrZEhYNUs1bFFTL2plRWdaRGxPQ0Q4YUpWRzBWU2wvNmpPVWEyejZs?= =?utf-8?B?dXJiNTExdUt4YjhzQ2JBTmVDSkNiRWdKVEZuRHBRNURDUVpMMzNqK25yTk1j?= =?utf-8?B?SkFRdk9jTC9ZNVllaGZwUFNKajBVR1U0bFFpbkNrV2VmUmJLMUZRekRiWGhP?= =?utf-8?B?bFZHUWxWT0JCLzRvdjA5ckdxcFpYRHl2ZzdVdiszQ25YUTljTHI3ZEZjbmpS?= =?utf-8?B?M0x1MmwyaTlCUEk5ZTBXdnZjOUtUeGNONDEyTC9LN28yVmJScUVDWDU4TW9D?= =?utf-8?B?M2dvd2FwT2dJRnM1eVB1dzlxS01sUXpqcWhYM3B5ZHBFMlRXOS9kcGFxam9a?= =?utf-8?B?ZFhOdWxDVDd1Y283alUrd29KSW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TY1Zjc5bUVrK3ozeWJ2K0Vvck1JajFENmt0dXRUR3QwNzZlWkRW?= =?utf-8?B?ZmxqTmlhM2FocnZCQjVBNTdvY3N6NDF6YkJWQzNzT2JvRXVzWHRhaWtVSm01?= =?utf-8?B?YWtCelptWURhRE5kb1ZWajJWN1ZaTUR2dmVnSmlFM205cE9xNHdKVGc9PQ==?= X-Forefront-PRVS: 0340850FCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39410400002)(39860400002)(39400400002)(39840400002)(39450400003)(2906002)(23676002)(33646002)(103116003)(2950100002)(230700001)(9686003)(66066001)(3846002)(6116002)(47776003)(72206003)(53936002)(42186005)(53416004)(55016002)(50466002)(7406005)(54906002)(7416002)(38730400002)(110136004)(478600001)(8676002)(81166006)(86362001)(76176999)(6506006)(50986999)(305945005)(54356999)(4001350100001)(1076002)(5660300001)(7736002)(4326008)(83506001)(25786009)(189998001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1141; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzIzOmJBRW4vTW1PRzN6dGtUWitpUldZS216R2Rl?= =?utf-8?B?bXN5a3JzL0RPRG5yMFlSeHpKRmw1S1YrWjV3K2p3dXdkSGk2Z1FCWmRJMTVH?= =?utf-8?B?eVNIVmJkOTB6TldEUkJDcExveHVtRmJadGVhQ0J4NmxkQUhvcXd5eDRmTG9n?= =?utf-8?B?RUNVN3NNNUUxK3R2aUZxUkZPdU1UQllpL2ZKREJsalFIRGVDMnFSVDMrWDBP?= =?utf-8?B?dXlSV1JUOW02RGlvazc5SnNOVWl4QnBVOVluMnFQbkhBU1N1Um5Gd3hPVkhv?= =?utf-8?B?c3BId05mVmpOVmZtKysxajFEUVNUdm95RUxKbXRYQ2Q5S1BFL0ZMMG4xQXNJ?= =?utf-8?B?a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oyWTqb9riItOatVvpyInCMtdNuGvMgeS9HUcIOIf45riQegrGuvNtHYEjljUoqcbYDHaRyah6NWRH1CGnyNNlZaEFlDmKnXGTtwNL6KfWATDEef0FqmuBiS6oEwk42mBmzcOS5d5v9+RDjqzRHH0ajgaRTapiD1+sikdtxGgKKHBuIM+e6IXZn9AK7zGXGcIR4AU7qkwNj690aQepX6uXsuxdrQwKp+k3ibbsBBj3KiyctaowejX8JxNWCVF9nfoDF0dnn3CfPr7NbCUkBPQRHjTm4iitjZMykprlmR6GxCGF64wRMnNl5GtNO8RR2mvDqx5um1cY6tuHsykE09JkdBJbHwAG1pKl2bplsskhVEajd/M/eCEBXgQ/juF2a3V2T9beSg5I3I+6qAg06KsGDANyi25aNFxhjfWxq2RnIfNQ9eGGq5bD16sRyB7VO/fYrAGASTynRwllwOH8QRJeZgR5eggJ5dI0QRNVepIk57TfPPDYX6jHVAq2J+jYLFV+wMVlMd4AfwXyb7E75obpM7NhHBuZD9MNzrti0zp1lFs= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 20:tdxuvTw5atnycAVYgkR/aZCLJea17GNRbdRTn6/wWQ4XWXMkQC2aeNNAXOF/udEuTb8gRYLdbS8norg5YlA/P6e1BFyCIHdD6avfjl6okcHp80ENdHIDDCEHcoHAJ5qrX2ZXthohf2LbliTA9HNWCQO/QsOmzzIgENnDREQGdVFjrQBoAF0H9pVd6qdzDkWqsOtwkH6whcgezxJKsoB9ml4myYmBLssU0xf39bCFHGR2wpJcdF7gibW062htDfiI X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 18:53:40.9649 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1141 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 20/36] x86, mpparse: Use memremap to map the mpf and mpc data 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 The SMP MP-table is built by UEFI and placed in memory in a decrypted state. These tables are accessed using a mix of early_memremap(), early_memunmap(), phys_to_virt() and virt_to_phys(). Change all accesses to use early_memremap()/early_memunmap(). This allows for proper setting of the encryption mask so that the data can be successfully accessed when SME is active. Signed-off-by: Tom Lendacky Reviewed-by: Borislav Petkov --- arch/x86/kernel/mpparse.c | 98 ++++++++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 28 deletions(-) diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index fd37f39..5cbb317 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -429,7 +429,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) } } -static struct mpf_intel *mpf_found; +static unsigned long mpf_base; static unsigned long __init get_mpc_size(unsigned long physptr) { @@ -451,6 +451,7 @@ static int __init check_physptr(struct mpf_intel *mpf, unsigned int early) size = get_mpc_size(mpf->physptr); mpc = early_memremap(mpf->physptr, size); + /* * Read the physical hardware table. Anything here will * override the defaults. @@ -497,12 +498,12 @@ static int __init check_physptr(struct mpf_intel *mpf, unsigned int early) */ void __init default_get_smp_config(unsigned int early) { - struct mpf_intel *mpf = mpf_found; + struct mpf_intel *mpf; if (!smp_found_config) return; - if (!mpf) + if (!mpf_base) return; if (acpi_lapic && early) @@ -515,6 +516,12 @@ void __init default_get_smp_config(unsigned int early) if (acpi_lapic && acpi_ioapic) return; + mpf = early_memremap(mpf_base, sizeof(*mpf)); + if (!mpf) { + pr_err("MPTABLE: error mapping MP table\n"); + return; + } + pr_info("Intel MultiProcessor Specification v1.%d\n", mpf->specification); #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32) @@ -529,7 +536,7 @@ void __init default_get_smp_config(unsigned int early) /* * Now see if we need to read further. */ - if (mpf->feature1 != 0) { + if (mpf->feature1) { if (early) { /* * local APIC has default address @@ -542,8 +549,10 @@ void __init default_get_smp_config(unsigned int early) construct_default_ISA_mptable(mpf->feature1); } else if (mpf->physptr) { - if (check_physptr(mpf, early)) + if (check_physptr(mpf, early)) { + early_memunmap(mpf, sizeof(*mpf)); return; + } } else BUG(); @@ -552,6 +561,8 @@ void __init default_get_smp_config(unsigned int early) /* * Only use the first configuration found. */ + + early_memunmap(mpf, sizeof(*mpf)); } static void __init smp_reserve_memory(struct mpf_intel *mpf) @@ -561,15 +572,16 @@ static void __init smp_reserve_memory(struct mpf_intel *mpf) static int __init smp_scan_config(unsigned long base, unsigned long length) { - unsigned int *bp = phys_to_virt(base); + unsigned int *bp; struct mpf_intel *mpf; - unsigned long mem; + int ret = 0; apic_printk(APIC_VERBOSE, "Scan for SMP in [mem %#010lx-%#010lx]\n", base, base + length - 1); BUILD_BUG_ON(sizeof(*mpf) != 16); while (length > 0) { + bp = early_memremap(base, length); mpf = (struct mpf_intel *)bp; if ((*bp == SMP_MAGIC_IDENT) && (mpf->length == 1) && @@ -579,24 +591,26 @@ static int __init smp_scan_config(unsigned long base, unsigned long length) #ifdef CONFIG_X86_LOCAL_APIC smp_found_config = 1; #endif - mpf_found = mpf; + mpf_base = base; - pr_info("found SMP MP-table at [mem %#010llx-%#010llx] mapped at [%p]\n", - (unsigned long long) virt_to_phys(mpf), - (unsigned long long) virt_to_phys(mpf) + - sizeof(*mpf) - 1, mpf); + pr_info("found SMP MP-table at [mem %#010lx-%#010lx] mapped at [%p]\n", + base, base + sizeof(*mpf) - 1, mpf); - mem = virt_to_phys(mpf); - memblock_reserve(mem, sizeof(*mpf)); + memblock_reserve(base, sizeof(*mpf)); if (mpf->physptr) smp_reserve_memory(mpf); - return 1; + ret = 1; } - bp += 4; + early_memunmap(bp, length); + + if (ret) + break; + + base += 16; length -= 16; } - return 0; + return ret; } void __init default_find_smp_config(void) @@ -838,29 +852,40 @@ static int __init update_mp_table(void) char oem[10]; struct mpf_intel *mpf; struct mpc_table *mpc, *mpc_new; + unsigned long size; if (!enable_update_mptable) return 0; - mpf = mpf_found; - if (!mpf) + if (!mpf_base) + return 0; + + mpf = early_memremap(mpf_base, sizeof(*mpf)); + if (!mpf) { + pr_err("MPTABLE: mpf early_memremap() failed\n"); return 0; + } /* * Now see if we need to go further. */ - if (mpf->feature1 != 0) - return 0; + if (mpf->feature1) + goto do_unmap_mpf; if (!mpf->physptr) - return 0; + goto do_unmap_mpf; - mpc = phys_to_virt(mpf->physptr); + size = get_mpc_size(mpf->physptr); + mpc = early_memremap(mpf->physptr, size); + if (!mpc) { + pr_err("MPTABLE: mpc early_memremap() failed\n"); + goto do_unmap_mpf; + } if (!smp_check_mpc(mpc, oem, str)) - return 0; + goto do_unmap_mpc; - pr_info("mpf: %llx\n", (u64)virt_to_phys(mpf)); + pr_info("mpf: %llx\n", (u64)mpf_base); pr_info("physptr: %x\n", mpf->physptr); if (mpc_new_phys && mpc->length > mpc_new_length) { @@ -878,21 +903,32 @@ static int __init update_mp_table(void) new = mpf_checksum((unsigned char *)mpc, mpc->length); if (old == new) { pr_info("mpc is readonly, please try alloc_mptable instead\n"); - return 0; + goto do_unmap_mpc; } pr_info("use in-position replacing\n"); } else { + mpc_new = early_memremap(mpc_new_phys, mpc_new_length); + if (!mpc_new) { + pr_err("MPTABLE: new mpc early_memremap() failed\n"); + goto do_unmap_mpc; + } mpf->physptr = mpc_new_phys; - mpc_new = phys_to_virt(mpc_new_phys); memcpy(mpc_new, mpc, mpc->length); + early_memunmap(mpc, size); mpc = mpc_new; + size = mpc_new_length; /* check if we can modify that */ if (mpc_new_phys - mpf->physptr) { struct mpf_intel *mpf_new; /* steal 16 bytes from [0, 1k) */ + mpf_new = early_memremap(0x400 - 16, sizeof(*mpf_new)); + if (!mpf_new) { + pr_err("MPTABLE: new mpf early_memremap() failed\n"); + goto do_unmap_mpc; + } pr_info("mpf new: %x\n", 0x400 - 16); - mpf_new = phys_to_virt(0x400 - 16); memcpy(mpf_new, mpf, 16); + early_memunmap(mpf, sizeof(*mpf)); mpf = mpf_new; mpf->physptr = mpc_new_phys; } @@ -909,6 +945,12 @@ static int __init update_mp_table(void) */ replace_intsrc_all(mpc, mpc_new_phys, mpc_new_length); +do_unmap_mpc: + early_memunmap(mpc, size); + +do_unmap_mpf: + early_memunmap(mpf, sizeof(*mpf)); + return 0; }