• Ingo Molnar's avatar
    x86/fpu: Fix FPU related boot regression when CPUID masking BIOS feature is enabled · db52ef74
    Ingo Molnar authored
    Mike Galbraith reported:
    
      " My i7-4790 box is having one hell of a time with this merge
        window, dead in the water.
    
        BIOS setting "Limit CPUID Maximum" upsets new fpu code
        mightily. "
    
    It turns out that Linux does a double workaround here, as per:
    
      066941bd ("x86: unmask CPUID levels on Intel CPUs")
    
    it undoes the BIOS workaround - but as a side effect the CPUID
    state is not completely constant during early init anymore,
    and the new FPU init code did not take this into account.
    
    So what happened is that the xstate init code did not have full
    CPUID available, which broke subsequent attempts to use xstate
    features.
    
    Fix this by ordering the early FPU init code to after we've
    stabilized the CPUID state.
    Reported-bisected-and-tested-by: default avatarMike Galbraith <umgwanakikbuti@gmail.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20150627082514.GA10894@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    db52ef74
common.c 35.3 KB