Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1536580
| 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 | 2016-12-06 02:10 +0100 |
| Message-ID | <sLcqB-3CS-29@gated-at.bofh.it> (permalink) |
| References | <sLcqB-3CS-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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