From patchwork Fri Jul 7 13:42:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9830465 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 6B52A602CA for ; Fri, 7 Jul 2017 13:48:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1562F28514 for ; Fri, 7 Jul 2017 13:47:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09DDD285EB; Fri, 7 Jul 2017 13:47:59 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5B0028514 for ; Fri, 7 Jul 2017 13:47:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753155AbdGGNnX (ORCPT ); Fri, 7 Jul 2017 09:43:23 -0400 Received: from mail-by2nam01on0064.outbound.protection.outlook.com ([104.47.34.64]:15824 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752703AbdGGNnQ (ORCPT ); Fri, 7 Jul 2017 09:43:16 -0400 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=9JdqfmLVHYCrg0v5+Pitg9yzHyZd77lR0BvWKOO0Q9c=; b=ANT3d0cCGi0msfEq/lFqIByaLHYam5U/isiZzZDqm+AS4oRKOBL6P+Bv3slys5pj88n0Qyt1cSlAfMk0hFBvkcj9kEbvi0pCqN2NBj43RbUXhIHFFkBX/vtHb4hdz1IB9t96Td5bQhftAPOXy7cUz1B0O/5UooPeNYz2HPHiDJw= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=amd.com; Received: from tlendack-t1.amdoffice.net (165.204.77.1) by MWHPR12MB1149.namprd12.prod.outlook.com (10.169.204.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Fri, 7 Jul 2017 13:43:01 +0000 From: Tom Lendacky Subject: [PATCH v9 26/38] x86/CPU/AMD: Make the microcode level available earlier in the boot 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 Cc: Brijesh Singh , Toshimitsu Kani , Radim =?utf-8?b?S3LEjW3DocWZ?= , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , Jonathan Corbet , Joerg Roedel , "Michael S. Tsirkin" , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Konrad Rzeszutek Wilk , Borislav Petkov , Andy Lutomirski , Boris Ostrovsky , Dmitry Vyukov , Juergen Gross , Thomas Gleixner , Paolo Bonzini Date: Fri, 07 Jul 2017 08:42:58 -0500 Message-ID: <20170707134258.29711.87816.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170707133804.29711.1616.stgit@tlendack-t1.amdoffice.net> References: <20170707133804.29711.1616.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: DM5PR16CA0043.namprd16.prod.outlook.com (10.172.42.157) To MWHPR12MB1149.namprd12.prod.outlook.com (10.169.204.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 22ac3e26-3738-4dbb-86f6-08d4c53e1710 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:MWHPR12MB1149; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1149; 3:ohq/PbgnPnmT4rusJI6Lwj/KfBGcVbzMpGYuE9MjLXQf+5WR9jdxEoJNLjMW9ZNz0UqwKvjUzny7+x8UjGkJXTFMvsTwvp2CnzpwUVnttLydjk1d85dPANTz0a6A1rfkXuZA6V6nyQ5LpS8+Pchpn0H22qsz9zA78hlVLPtflMWkzrK0HGs+dm/Js39Er6XXk7c3f0r7vli6mRf8ilOSl4vdB2yRTl3kWhe9A7012Q34ZYqdej8W0Fgm/fpigtdfwolPDaq1HRQdSfxZGOU/VLQso4mTHA3j3DY7YL0p0GX/lUkdvH66QPX2wYufIVgMpJeJPItBbEdqVCKWkcG8CMDi7fo1ZjPoMzVh8MttH5FqEbqsL03+uXQ/3SrQbeloTOTNCg+retz5yqkWUuLpEIuVKvZmlJKTaVVPjWr8PfS95zsd2pZzKXF0UfwumIKNIGX4s4w7SX7dFUKopzDoCghvZAfdifd8bXZneYCEbLY1Baztp4Nsi/Idfn+XT6iuyfzx9iOGD64zW0l6GkPykE54hBRpku0oETJZ+cCjdn4D8wMGanxRM9Qt0yfVfTTj/pkUl4qlPGi7nx110FPx4pa9ayI5KPm4/4hqOu4KYzbp2DM3pzRT+XcerVZxmSOvlT1uJqg8+leL6N7Bf+qw/Rf3/VVdcgHSOHC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4NraiNhT9LGGP7BxnAbqpVKiFoC/vrP3bfhgkLTqejcAw4+OPm0COXEVLURETaTPHn6qx/IAs8gM+SUiAVq/neprRPoHXhs/DeWk8GQfbU4sQYOnxYKLbx5rCWYlyTtaUvrJL7BsJPZi4qMrDw72mH01cKSNmR9+AOlsPcxeTRFJXDnX+Ri3Lmv/f76VAHd3NQ0VxFgv2Qm1O7FazS3AXMFGr2zXD/ULD8XlW8uY X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910064)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(6072148)(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-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTQ5OzQ6ZVBuZHc1YTBYUi9URDNmcDhyRFRkcmZKZ09B?= =?utf-8?B?YW81MXVPeVdUL2lUUDJIclVKUFRPYjVrakVLQmlScjNkMHNWWHpsTHJGMkMw?= =?utf-8?B?TFlHWUhiV1FObW9yMGVDMnEvUG5DVHBKeVgrRkFqMWtrMytIQTdSN0I1SjZ3?= =?utf-8?B?TFVOOUEwMGNnY1VuS1k5cWRkZW8yRjNPeStoYmxSV0hveFBqaFhUVHU5ejVG?= =?utf-8?B?NGwreWtHOFlTdUdJeWhnbDZBUjNacjVlQnhJTHFDa085d2I2TDlUaFJVQmxH?= =?utf-8?B?TVoxZG1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?= =?utf-8?B?MHpDUlRJU2ptNGFTZEE5L0VRcFRIaVRKbUEzWi9oWWlUVlVoYk9Fbm5jZ25a?= =?utf-8?B?MWdlU1BqUHI2My9McXc5TDBkNHIxNTNML2N2T3lCak5sZlo0eXorVWU5MWdN?= =?utf-8?B?QlpGNHpmQ0tNTjd6UkpONFBDNE9tWjQ2MitGY0JiVmxKS000RE4zU3NVL25t?= =?utf-8?B?T2FxYkpUSWpocTZkQWlVT1ZNWlpxcXRXaFhvVDRxNHF5b0RXV2Q4ZG5OWHB5?= =?utf-8?B?eHQ5dUVJSzZZcjNncFZBR2RHaVJYTm9USGtwKzgxdWdpKzVMZ1RIS3RvU2wx?= =?utf-8?B?MDJhcm1yQmhCVWsxc2ljOXFUdWpHVnI4enpmSzFHZkNYV29EYmdJUmZpaGdt?= =?utf-8?B?WWFCUEFoK2l0dzZTQW5XY2Rjd2dCT3FvV3QwZDhqQVlJakRiWkwzaGxIMWsr?= =?utf-8?B?YWRWQWJQTURFRWJ4MlpVZEw3YVBnZDR5cGFKL3ZLZEtKa2VEdlRzMFR4VnBP?= =?utf-8?Q?iv+gVfAcOt+8eMxvCmwzrTbjhknf6tAk9ML2ek?= X-Forefront-PRVS: 0361212EA8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39850400002)(39410400002)(39450400003)(39840400002)(39860400002)(9686003)(54906002)(53936002)(33646002)(47776003)(103116003)(6116002)(3846002)(25786009)(54356999)(76176999)(110136004)(38730400002)(42186005)(1076002)(53416004)(4326008)(50986999)(230700001)(66066001)(6506006)(86362001)(55016002)(6666003)(2950100002)(2906002)(23676002)(305945005)(189998001)(50466002)(97746001)(478600001)(72206003)(81166006)(8676002)(83506001)(7736002)(7406005)(5660300001)(7416002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1149; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics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ics: 1; MWHPR12MB1149; 20:1jFIH3fRhif9H62Le9LtKja7jPMHy4MtiYobqd/lFnpYWB8SfU7i5Js++VFHWbmh8v/MTyU01rxXERMQh84X+H5XRi56DK8kvbZhyhKHNQo/ZE8E1/jHM6ff2RUXQZyqOOfyw31El40C+wFfPlZrbiGk+fWqj7zcoJCXKWPsizM0t5gLLB15CURhWVzPhndczFOukmbfI2cW60+Ozriqhli09+rHC6azfQjiKJ3fEVXVagoaEr1Z6kOC2LgRDQ5X X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2017 13:43:01.0798 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1149 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move the setting of the cpuinfo_x86.microcode field from amd_init() to early_amd_init() so that it is available earlier in the boot process. This avoids having to read MSR_AMD64_PATCH_LEVEL directly during early boot. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/kernel/cpu/amd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 5bdcbd4..fdcf305 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -547,8 +547,12 @@ static void bsp_init_amd(struct cpuinfo_x86 *c) static void early_init_amd(struct cpuinfo_x86 *c) { + u32 dummy; + early_init_amd_mc(c); + rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy); + /* * c->x86_power is 8000_0007 edx. Bit 8 is TSC runs at constant rate * with P/T states and does not stop in deep C-states @@ -746,8 +750,6 @@ static void init_amd_bd(struct cpuinfo_x86 *c) static void init_amd(struct cpuinfo_x86 *c) { - u32 dummy; - early_init_amd(c); /* @@ -809,8 +811,6 @@ static void init_amd(struct cpuinfo_x86 *c) if (c->x86 > 0x11) set_cpu_cap(c, X86_FEATURE_ARAT); - rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy); - /* 3DNow or LM implies PREFETCHW */ if (!cpu_has(c, X86_FEATURE_3DNOWPREFETCH)) if (cpu_has(c, X86_FEATURE_3DNOW) || cpu_has(c, X86_FEATURE_LM))