From patchwork Tue Jun 27 15:11:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812437 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 9FDC860351 for ; Tue, 27 Jun 2017 15:13:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99BFF27FAD for ; Tue, 27 Jun 2017 15:13:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D174286BC; Tue, 27 Jun 2017 15:13:26 +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 DF73B27FAD for ; Tue, 27 Jun 2017 15:13:25 +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 1dPs94-0001Ou-PI; Tue, 27 Jun 2017 15:11:14 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPs92-0001NF-MP for xen-devel@lists.xen.org; Tue, 27 Jun 2017 15:11:12 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id F9/AE-19466-F8572595; Tue, 27 Jun 2017 15:11:11 +0000 X-Brightmail-Tracker: H4sIAAA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ref: server-9.tower-206.messagelabs.com!1498576268!105432565!1 X-Originating-IP: [104.47.32.80] 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 59251 invoked from network); 27 Jun 2017 15:11:09 -0000 Received: from mail-sn1nam01on0080.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) (104.47.32.80) by server-9.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 15:11:09 -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=gfn6shRerTVWvu7a7l6KrsYp8iQxurHZX1V52BIPgy0=; b=AAZvDQxzUi9Jom8BxoVThlET1e7NgQ9G6Ae8sVJO5xVJaDiNDIxstQPiZEt1luZbiZas3kZNZT0jqED8xwJ4eWoaj5GH/HUR80jz0i2URTyPTq1eH60z/L0BetHNStuvsBOb/urPw50/YBhEuWS284SNdD65E6YIrbAD84Pbwx8= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by MWHPR12MB1150.namprd12.prod.outlook.com (10.169.204.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Tue, 27 Jun 2017 15:11:04 +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: Tue, 27 Jun 2017 10:11:01 -0500 Message-ID: <20170627151101.17428.86533.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627150718.17428.81813.stgit@tlendack-t1.amdoffice.net> References: <20170627150718.17428.81813.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: MWHPR12CA0038.namprd12.prod.outlook.com (10.172.49.24) To MWHPR12MB1150.namprd12.prod.outlook.com (10.169.204.14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d857d5c-0989-4fca-c60e-08d4bd6ebbbf 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)(300000506067)(300135500095); SRVR:MWHPR12MB1150; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 3:s/WtiV2CDpFxo7xGSSMhXX9Ay6K7R5xTDJf5hfx+AevDvRlsZhRw8aeagDJTP+x7LZ1RKUEUUOOH/AizFCsiYWYYihK5+9k6IOPJ50HCMVP4QZ061jgaKlQDlyjBYHnlZZEkBwKI097VHla76zdarBK1VMJ9bvPDGVMtB39+pPxP2OORqug3PzwNnQvK4wD6uBq9dy8UuMJm1OqYeGgnrjzPFTX/HbLNDIiyIW8a6hYUpcQREBKYoxCm63Blpp8S3mwXdMCX+53A2hKVq5Do17ElcOMedahvDcPHXKh0Vh3D9Qmd/H8YvBQRSL5oTI6amQWQdg3VoAfHa3VSCV18L/w5AzjVK3klzh/xCXnfCSuU+tbE3XFge3nxEazQ2vq7m8TwNqW+5TVLCLpZyjS9KLcZIrS10GLW+jgsSHdZZDExD9n4k1UIWeT6Y64yGsC8pGJv+pKsjYCFuFvA/bSgJ0LnVxv/w4M11KYi0pADK9jEUZcJeSmw9VG5VeVDaluoUZX6TpoC6ZaMvHhQJJ/ux8wxDgcikCr2G2MAkxNp59w36QoDrAGT6cUyDhrprI099CG0m/hQl+3x3b4dswwUjmOY1WccHV9i11aB3b7ANW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kCaOeAjQvyJVmIA+bsnrIje6pqt1SLG4ov2QcIOMgKjmdoF8durCbmo4ABaKn7cKAx5Gp2liHGoalm1DccLCxdaOsBBUebBUafXndJaIbcIQqC52EvBPwYa+J9YvUWYWR3yDSNpeYHa5Fwo13LO4gIrvPzDxNzxp/74XSbXnRowY8p8hd7IvAsvrRqTg5zV9IO8hH9NvyT0rGebZ+IyQxUq7G0Ml+is0a7uospnJUZqByF2jPc8uQcthsJdMNgppLgpoIbGk0H7qCu9w3yCUm3P2dxTOe3sDDHVNeGn+Hm9nPUZWMfZk+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(767451399110)(788757137089)(148574349560750)(167848164394848); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1150; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1150; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUwOzQ6aUo5UzFwYnlaT1VISTFDK3BjVE1USTRDVTRZ?= =?utf-8?B?ZVNKTmJHdW1PbWtIUUJ1VzNJNGpJaEgzUXpXc1ZHempTbFpZbnI4dkJzdFc4?= =?utf-8?B?SklyOWxWWHJFL2J0RDFyY21iNkZxd3hEM2p3MUlMRUFsVTA3QlhaMjZjK3dv?= =?utf-8?B?bjFBQkVhSXlyOEtZa1hGWmxxVmEzM0FLRVY3aDhVdFFYdmtyQ1JnNFJKak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hCTGd3cllGOUxSWjJRVXNU?= =?utf-8?B?WEZoa01uSXg4VXErU1NOZ2ZxcXlnbVNER1FWZ2lveUxwd1BWeHZSMGNUWWc1?= =?utf-8?B?QnVEamZPU2dKMHdUbndkdElEVXk4Y3hPU0IrRzRrTGVVa1hVK1VQT3R1VE5E?= =?utf-8?B?VFlqSUtoSlpuNnliTXMyQjJrZ28xM1BjeVpzR1hvbjlUUWxMNm5ZMHQwcitE?= =?utf-8?B?SzgyVnV1YkpPTGt5KzlvelhmamdOSEVHZzZ2bEM3WmxIRVZYSkhxc1BCYStG?= =?utf-8?B?VzFKeUVxVXcremJ3NmdXTFNkMldKVlB6Q1dwRndaeXloUThRY2ZkeTNTUUE0?= =?utf-8?B?a0N1QnRMeXh6RE5JYllpR3VkQlR1MDJIWDdQc1UxVVFVTGZ1OHNEeXpENlVr?= =?utf-8?B?SlVhbHBpMjZGcXI5cFJ6ZmNxQkdrdEhQdmNGNjhaMHJNUmtMUjJ5WXR1dkJ4?= =?utf-8?B?emljU3NQY0ZWNFo2R0d4bmpBQnd2Q01mK1dXUlh2T3ZzaU1qT0E3V0tPVnl2?= =?utf-8?B?dXJLQkxmcGlnODV0STNwWG4wbThaR2FIOGhCRXJ6UnRiRE4zOU1jSzUyb2RI?= =?utf-8?B?RTNnbGY4NTRrcUFnZGlqNFpCSEtQK01ENEowaWdDd0NiNGtIeGI2bG05dDEz?= =?utf-8?B?Z3JGa1lEVUhIL3EzakJSYzlpcFZlSktNTDlpN2RKZEVoSHY0Zld3QitjYk53?= =?utf-8?Q?UabWf7dW+HK1?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6009001)(39410400002)(39860400002)(39450400003)(39840400002)(39400400002)(39850400002)(4001350100001)(42186005)(110136004)(2950100002)(6506006)(6666003)(103116003)(38730400002)(189998001)(86362001)(97746001)(55016002)(54906002)(5660300001)(7406005)(305945005)(81166006)(7416002)(8676002)(53936002)(4326008)(9686003)(7736002)(83506001)(478600001)(72206003)(2906002)(66066001)(23676002)(25786009)(54356999)(76176999)(47776003)(53416004)(50986999)(50466002)(33646002)(1076002)(6116002)(3846002)(230700001)(921003)(1121003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1150; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUwOzIzOnJrSDhhbW9Ka2pXYndKRGVmUGc5aW95eEUy?= =?utf-8?B?NUxuVWdJTlErazdmRFZpNWdZMU11TWRXdlFzLzBSL3VpdzZDbEZoZjBVRm1H?= =?utf-8?B?V0JPaUpSTVJQb3RFZjV6VzZVbWZCRFFRTTFzK0dyc1cyYlBRNjRLUGwvM244?= =?utf-8?B?eVZpMzdaUEpmcnFmalA3SFIvcEhYNjBxRi9OVXhJcUFadjI0Q2c4VTN2TGRn?= =?utf-8?B?dEgyZHNqVjhMcWoxamw0RXJ5eVNuZ1dtc0l2ZmEydS8vR1hINE5zK3dwcWxa?= =?utf-8?B?SGtaOWlHOGR3N1V4Q2FQM09VQ0g3M3VJckJ6aFZGOGk0emo2K1BlR2I2Vytn?= =?utf-8?B?UWtCODA2R1ozcjh3bnNMckNxTktYT1g4WDM2WVdCUWhBOStLMVhZVTdFR0Jy?= =?utf-8?B?Sk5hUURsUWhtK3FIM25PUHJZVGZzcXcwUWhBeVR2SktKQ3M0VFJLSnU4dFZj?= =?utf-8?B?V1FrelN3Vkg2cWZIQ1BCaUZmcThYaWJ6ZDhNNGZ0OE9ORHczTDZoRFgwQXNa?= =?utf-8?B?U3d5NjdqczNLMkZrRzZLUHhuaUN4dVJ0Q0ZZaHlVZFRYZ1Vab2tTckZtK2lm?= =?utf-8?B?UTB3ZVdoSE1LRkJsQThUTk5tSEViZEtCRTZtOTVyZG5QTWx4ZjNRVTJ1U3h1?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cwVsC9+P4VrY1NNukBXh5TubJCeJnbWYeyXo94PfN9WotU4U8jijd4NkJU7YZtfsBXFwYh6UQo4xthn91LLgJSQPl6yNI2QppF+LdpAULDTWHWU5mDrW+pjCXEUrIdlZIBGiGIVO27PrOJRb6Z5e9zBr4lL88vvq1F6wLj8udGRxcfyOIRwNs8p7cv6xIGfHqabn85MsI1ih6C2xvqE7omDN3DA0qEJPr5aPAJxgwSe3jpjjRsGkGr80Mo5Z4EYPyTOzzc/xXkXOfMiiiUKZyQUi3+XyWNIVzn50WtVD4iMgu9st8B+CP7jWlnVaVVqlEYypCUjQI80c93mUN1ipGIHtDwsE+T7rILnQqPdyCcL3zMXIzRsj1MakahlT+X18oQe9ZXdIiDQR3oxYPCVNfskHFL2ZBo= X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 20:z5oTg3gF/GSJ6QfqkWwYTUhaf9yGRS5izNgYFU6MVCXjBxNjXubiWCOsYv9tszvg5CYCAlSBwBb0X3tCt19MeRs0LBAQ4Y97HAGaUs6c2pN/WeTQ3Phv8+d46U7u1TludIqKq5fjfTCGjgS7H3rfAQp84M/x6mTkPAzvjjErJDYgOKwmhc3yaDAJ+rOw5h0+cTuuiKf27xwCVh++KpcPMzI+f1V7dSialbC6TjztYtUzo0Sc2qiec0s3OVertsyv X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 15:11:04.0198 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1150 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 v8 RESEND 20/38] 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. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- 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; }