Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753369AbbF2J6J (ORCPT ); Mon, 29 Jun 2015 05:58:09 -0400 Received: from mail.skyhub.de ([78.46.96.112]:57202 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752145AbbF2J6E (ORCPT ); Mon, 29 Jun 2015 05:58:04 -0400 Date: Mon, 29 Jun 2015 11:57:45 +0200 From: Borislav Petkov To: Ingo Molnar Cc: Mike Galbraith , Ingo Molnar , LKML , "H. Peter Anvin" , Thomas Gleixner , Andy Lutomirski , Denys Vlasenko , Oleg Nesterov , Dave Hansen Subject: Re: [all better] Re: regression: massive trouble with fpu rework Message-ID: <20150629095745.GE12383@pd.tnic> References: <1435386316.3664.23.camel@gmail.com> <1435393129.3490.7.camel@gmail.com> <20150627082514.GA10894@gmail.com> <1435395328.6545.10.camel@gmail.com> <20150629064008.GA16251@gmail.com> <1435566329.2900.1.camel@gmail.com> <20150629083302.GA13113@pd.tnic> <20150629093504.GA20600@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150629093504.GA20600@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1909 Lines: 62 On Mon, Jun 29, 2015 at 11:35:04AM +0200, Ingo Molnar wrote: > I wish that 'unmasking' logic came with more comments: > > - Why do BIOSen ever mask CPUIDs? Doesn't say a thing why: 066941bd4eeb ("x86: unmask CPUID levels on Intel CPUs") SDM doesn't say why either: "Limit CPUID Maxval (R/W) When this bit is set to 1, CPUID.00H returns a maximum value in EAX[7:0] of 3. BIOS should contain a setup question that allows users to specify when the installed OS does not support CPUID functions greater than 3. ... Setting this bit may cause unexpected behavior in software that depends on the availability of CPUID leaves greater than 3." In the case of hiding XSAVE from windoze ninety-old, probably something was exploding there, there wasn't a fix to the software so the hardware had to become soft. Purely hypothetical, of course. The last sentence from the SDM quote above also explains why the Linux workaround of clearing that bit again, exists. > - Why do we unmask the masking? Also purely hypothetical: because Linux doesn't have the windoze problem. > - Why doesn't the kernel keep on working just fine even if certain > CPUID aspects are turned off? I guess that should be doable but one has to get such a box, enable that BIOS feature and fix all the fallout that happens. Provided it can be fixed. hpa went and reenabled those CPUID leafs instead in 066941bd4eeb1. I guess we simply shouldn't do any CPUID-dependent stuff before: if (this_cpu->c_early_init) this_cpu->c_early_init(c); and slap a big fat comment above it. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/