Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1536580
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Andy Lutomirski <luto@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH 3/6] x86/cpu: Re-apply forced caps every time cpu caps are re-read |
| Date | Tue, 06 Dec 2016 02:10:01 +0100 |
| Message-ID | <sLcqB-3CS-29@gated-at.bofh.it> (permalink) |
| References | <sLcqB-3CS-9@gated-at.bofh.it> |
| X-Original-To | x86@kernel.org |
| X-Mailer | git-send-email 2.9.3 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 34 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>, Borislav Petkov <bp@alien8.de>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Brian Gerst <brgerst@gmail.com>, Matthew Whitehead <tedheadster@gmail.com>, Andy Lutomirski <luto@kernel.org> |
| X-Original-Date | Mon, 5 Dec 2016 17:01:12 -0800 |
| X-Original-Message-ID | <e04d96bf465d5153aa29fb885fc038c254c441f1.1480985979.git.luto@kernel.org> |
| X-Original-References | <cover.1480985979.git.luto@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1536580 |
Show key headers only | View raw
Calling get_cpu_cap() will reset a bunch of CPU features. This will cause the system to lose track of force-set and force-cleared featueres in the words that are reset until the end of CPU initialization. This can cause X86_FEATURE_FPU, for example, to change back and forth during boot and potentially confuse CPU setup. To minimize the chance of confusion, re-apply forced caps every time get_cpu_cap() is called. Signed-off-by: Andy Lutomirski <luto@kernel.org> --- arch/x86/kernel/cpu/common.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 347ae0a19380..24e1e4004d42 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -758,6 +758,13 @@ void get_cpu_cap(struct cpuinfo_x86 *c) c->x86_capability[CPUID_8000_000A_EDX] = cpuid_edx(0x8000000a); init_scattered_cpuid_features(c); + + /* + * Clear/Set all flags overridden by options, after probe. + * This needs to happen each time we re-probe, which may happen + * several times during CPU initialization. + */ + apply_forced_caps(c); } static void identify_cpu_without_cpuid(struct cpuinfo_x86 *c) -- 2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/6] CPUID and FPU fixes Andy Lutomirski <luto@kernel.org> - 2016-12-06 02:10 +0100
[RFC PATCH 4/6] x86/fpu: Fix "x86/fpu: Legacy x87 FPU detected" message Andy Lutomirski <luto@kernel.org> - 2016-12-06 02:10 +0100
Re: [RFC PATCH 4/6] x86/fpu: Fix "x86/fpu: Legacy x87 FPU detected" message Borislav Petkov <bp@alien8.de> - 2016-12-06 10:30 +0100
Re: [RFC PATCH 4/6] x86/fpu: Fix "x86/fpu: Legacy x87 FPU detected" message Andy Lutomirski <luto@amacapital.net> - 2016-12-06 19:10 +0100
Re: [RFC PATCH 4/6] x86/fpu: Fix "x86/fpu: Legacy x87 FPU detected" message Borislav Petkov <bp@alien8.de> - 2016-12-06 19:10 +0100
[RFC PATCH 5/6] x86/fpu: Fix CPUID-less FPU detection Andy Lutomirski <luto@kernel.org> - 2016-12-06 02:10 +0100
Re: [RFC PATCH 5/6] x86/fpu: Fix CPUID-less FPU detection Borislav Petkov <bp@alien8.de> - 2016-12-06 10:50 +0100
Re: [RFC PATCH 5/6] x86/fpu: Fix CPUID-less FPU detection Andy Lutomirski <luto@amacapital.net> - 2016-12-06 19:00 +0100
Re: [RFC PATCH 5/6] x86/fpu: Fix CPUID-less FPU detection Borislav Petkov <bp@alien8.de> - 2016-12-07 10:50 +0100
[RFC PATCH 6/6] x86/fpu: Fix the "Giving up, no FPU found" test Andy Lutomirski <luto@kernel.org> - 2016-12-06 02:10 +0100
[RFC PATCH 3/6] x86/cpu: Re-apply forced caps every time cpu caps are re-read Andy Lutomirski <luto@kernel.org> - 2016-12-06 02:10 +0100
Re: [RFC PATCH 3/6] x86/cpu: Re-apply forced caps every time cpu caps are re-read Borislav Petkov <bp@alien8.de> - 2016-12-06 10:00 +0100
[RFC PATCH 2/6] x86/cpu: Factor out application of forced cpu caps Andy Lutomirski <luto@kernel.org> - 2016-12-06 02:10 +0100
Re: [RFC PATCH 2/6] x86/cpu: Factor out application of forced cpu caps Borislav Petkov <bp@alien8.de> - 2016-12-06 09:40 +0100
csiph-web