From patchwork Tue Jun 27 14:59:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812239 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 A33DB60351 for ; Tue, 27 Jun 2017 15:02:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A185F27FAD for ; Tue, 27 Jun 2017 15:02:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95E9128111; Tue, 27 Jun 2017 15:02:46 +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 EC84F27FAD for ; Tue, 27 Jun 2017 15:02:45 +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 1dPry9-0004Om-5J; Tue, 27 Jun 2017 14:59:57 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPry7-0004Nm-Ol for xen-devel@lists.xen.org; Tue, 27 Jun 2017 14:59:55 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id DC/C5-03696-BE272595; Tue, 27 Jun 2017 14:59:55 +0000 X-Brightmail-Tracker: H4sIAAAAAA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ower-27.messagelabs.com!1498575592!109821025!1 X-Originating-IP: [104.47.32.88] 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 39533 invoked from network); 27 Jun 2017 14:59:53 -0000 Received: from mail-sn1nam01on0088.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) (104.47.32.88) by server-9.tower-27.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 14:59:53 -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=feDb005b8iRGvU0lC41JkU4g2wcG/3QhSi19HtYYKPua70+UTUkAhiR1ly4CzBuMoSbhqbhml9S/SPqqblPZaZUzmTuo6kotscgLKkf6wEizfzE3Qgx1AlLGPj4yrOksYvyOOQSr//50eFk9R85qirPqIAJP8BzEbqWw/Rn9wPg= 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.1199.15; Tue, 27 Jun 2017 14:59:50 +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 09:59:48 -0500 Message-ID: <20170627145948.15908.24705.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627145607.15908.26571.stgit@tlendack-t1.amdoffice.net> References: <20170627145607.15908.26571.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: DM3PR12CA0064.namprd12.prod.outlook.com (10.161.151.32) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fa161968-511e-4c38-9a9a-08d4bd6d29c0 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); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 3:3d20bi9JIqztksuKks80HUvgucF4hOY7dmDU1pjv52xbiXl0V7pw5bchc8OU5tvR0dzOi9li8QwMrox8Zx8kmVhOaBY6jnjTs1O+bJEyjnRZGjTmR6Q3CnGDUyXeh4pFbFGea0aaqlfynSoh9CGt38ZyXS6K2JWEC14AS68d70sRZ7UkkqPND750sT6WDhMclAqWJeIb0X9SShVK6ETTLiihELo49egcniLkst29vUq6HYoHB1m6En4Kh+4WJyurIdyH5UOabUCfiqlp94ApyY1wgJ9SWsdTQreBySglWwCWcnGB7TOWiu+9y/31kZHKSS7hYFuea3FiItTCjy4vtFNM/mjsO/nFzNVfnG5HNwdhPiJZO9tXL62uIql72491wpyhl0shknyT2v1VxELARxODol8bgyW+ZiVv7IvOyzl/ZrV5dKpfhBL16U91l6mTnNOsoiyetNF12ZYBJeT24zpTux4rYCViC17TKVPsTb+5NLtMXWBsmhywXjGOIRJzJ9ykKDFnO1Ao8dUmvbnmbMnuyzMLmwtF33Xrl/TpymlOJxAOXu0WSwiA9MCoWlu4LGW8Fc3vP6KiHM7w8IEAzztMnmI8RPJ2aNb+ikKkYRyIBJVrZ5C91BwrnnHz2t3QEB2OiKib3J6CH9IsVNT9r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XtMDru0f81AM5k0kX3TLzP/wZjuWIH3dqxqyuy5ctPYfH5SBaeU4Egvur6pbza604axQ0htaCnd12tthA78HR3uWjzcmOHS/6EMvXLKHiBNsJbZj1jMA1lJY+2oeLhXHzWxE4YluBGkwgZRDV918g1gGyrdP7UeJtFwHWtdkoAtyIjFo9VkXbtP65eMmsvUP8St 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)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(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?MTtDWTRQUjEyTUIxMTQxOzQ6T0xtOUtBYWl3ai9xOVQ0N2dUNEQ5MlF1R014?= =?utf-8?B?TTNiS0paekJJOVpLNm5JQUNiZjdXWUo5ZWE2dmkxdGhCSFlwYk9Oem5pYVNM?= =?utf-8?B?eHIwK25DWm9peG1ORm9yQkZMVkkyNCt1ckFOQysvcEttbHpnU3pzcy9rMkw2?= =?utf-8?B?bGcyL3RGK0JXN1hZYmxneWxTNitVUGxqbXVnVXpaZVltSzVuVXI3UkhYOVF1?= =?utf-8?B?U3V0ZGo5aW9vcnpJOTAwNnQ2aURmOHFUV3FuLzBYdzZnNFlZa2RGUmR0NEZB?= =?utf-8?B?aXE3bXRYMXNwcUNXQ20vT08wZkpjTFVlOTZIc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pEdm5WS20wYXdxSXdmUUx3N1BhcFVQ?= =?utf-8?B?M1BTWCtzUEYwRFRPOGtSaTlRdWlrWjU1NysxM29TQ1VQY0NiRkswUDJSTDc5?= =?utf-8?B?am9VN1p1OE1MY0p2eE1uRUw3enJYQ3VUUnExSXhPN0dveXF2Q1VPNmd5bk5K?= =?utf-8?B?aVh4OHhHRzdTOUM4ZHdFTmlrbnR5Q0drZ0VyY0c4Q1hhSnlMdFZWRXBkSGpR?= =?utf-8?B?MEdkOWVPQjFJSk9ib1VLN2x1VGx4RURpQzVEOXRocmFub2cvUGk0NUd0b1Jr?= =?utf-8?B?S0FtcnA2OTZ4QmFSbklGbzRvdkROSGx1VkRZVGhXWW56VmtBakg1azRMWXZp?= =?utf-8?B?Nko1azVvMTdBSU5ITjFudVZ3dUZTUkYzNHpDc0wzNmxPeFpsSmhDMEszZFY4?= =?utf-8?B?YjVkUkVhVE9vdjU5L2RZdlBWT1Z5Z0Zya3hBZHdTOTNBcTVjMkFMVU01RXB2?= =?utf-8?B?Q1J2bk16RUQwV1IzUjNQLzJPL09GdUQxUGRPUWZaazBoSTZJWkZVS3R2WDE1?= =?utf-8?B?bndSWUNWQ3pVSjFMaU1Na3htdjRFM0svVlRQM1BOYzJrUVlNSytYTWJ4clpF?= =?utf-8?Q?1EwFs0d4HP5D?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39860400002)(39850400002)(39450400003)(39400400002)(39840400002)(54906002)(9686003)(2950100002)(6116002)(55016002)(83506001)(110136004)(38730400002)(2906002)(54356999)(76176999)(23676002)(53936002)(8676002)(230700001)(4001350100001)(478600001)(25786009)(50986999)(3846002)(4326008)(1076002)(189998001)(81166006)(33646002)(7736002)(103116003)(42186005)(66066001)(47776003)(50466002)(72206003)(53416004)(97746001)(5660300001)(305945005)(86362001)(7416002)(7406005)(6506006)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY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KzIrOhWzfJtfralO/YnpVse6y3KnVYqrPE651mhB8B/Uuoth0EDy3KjJ5zV1bIJ1NjsYkW00P5yU3uXbTEpOIyRuxnXcHYqWiUoOa3SDqrJDyTvPo6zj34ai93T; 24:vIfLMwpXeeePnbFvZvvVGuTVR9OOOGCcglb/8U/pyy6h1lMh8yd3MPRhJDJdgG7DnjO6esNzKmXUuerM559v74vOKv3PJStuR7iY9jt/Ku0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 7:YuAU2PJWB+HVZP+yW1AItW/b9sgOgIJE+eDsSlOM4wR6Vg1VgOoPmDTJu2OOclIGJWSIpqCMlLn44KqGjrcSMb+h+s9HFQsrmR7RJsRNaHnEdpatog96B2qAQCj7XOVuVCeQvOq+W/FI0i/abuyRdKVP6KTTdCe9PY04h25Dav6EOd51rQib94qCEXPaplYBEa/2M/qFAq2AAwhwK0qqDd/mlGA/QFs5mc/L1GAysSS95f4Zq3qxAYFRCSMqEZ2wk0WpEdhpOodpetsQn//GuZWEFXmajWdGvHKGemCE6WM2Q3t6C/um6TJcdovZkPLxsURkNNLBoA6YOoPRzw5PWufhhZ2MO41B6p9mYCSg8vgty25dAgK8rDd0BQLG73BXgrsMLEmS4cRFST/sGaViSAOTidC944g2d12huRq6CyqVq5BTlJDxNqVE2eFXCmUH5v3uIs+w61IxTCPld+2A0deYhptoe03SCHgNMDp+6pCBbKqc5qvqyNli+JjpFujFRbx2atYhmbg/7Di746D62rWz4XEOEcRZz4YJKd/Wmyp2YlncxMJP3cEASUhQ6aMbSyHfdJqHFGMig5KkgS0gcInZWapeNKD2DDNbkTTqv9adl+Nrqjpt803KyA9tIEUHiD5EUeCx7XIERr5EznMmu1UXMpz4P1tE+z7sBJQ/YEU+nFOFXDP8wwGKWWijtPMEOq3+L7SYwRtscQ5ptbRzRA3QzqDp17xyM+FY1rPdyHI3utPK/DTPPofQWiuOJZaEKbQWfotKxUmgRoMWOD1iAZyZNItjNC8KRtFuhY+tcaU= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 20:M0BRlMpyBRGoEhmgPtguHKaiRHU6gSoLorW8Ox3HVvFLEDMKkcyIevS/0l4N9JMaXhQPRA3FUobfpTMcVDj/3OBhfjwww9J1iMoRKxjehq6ZXI0GQHzKHmSoUvhb+R8aPyX3EcUgVnZXq6uppV9inznZFgS1bYdDp4GyGoYUUxjeU+4X3KYpFsmFNsMgbe2/pFfAD72IjU1+aZlW6jZw0EQJyfWXcoFB98H8fml3RMtFSz/CtbB55fb2CnjeSY+U X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 14:59:50.2218 (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 v8 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; }