• yu-cheng yu's avatar
    x86/fpu: Fix early FPU command-line parsing · 4f81cbaf
    yu-cheng yu authored
    The function fpu__init_system() is executed before
    parse_early_param(). This causes wrong FPU configuration. This
    patch fixes this issue by parsing boot_command_line in the
    beginning of fpu__init_system().
    
    With all four patches in this series, each parameter disables
    features as the following:
    
    eagerfpu=off: eagerfpu, avx, avx2, avx512, mpx
    no387: fpu
    nofxsr: fxsr, fxsropt, xmm
    noxsave: xsave, xsaveopt, xsaves, xsavec, avx, avx2, avx512,
    mpx, xgetbv1 noxsaveopt: xsaveopt
    noxsaves: xsaves
    Signed-off-by: default avatarYu-cheng Yu <yu-cheng.yu@intel.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
    Cc: Ravi V. Shankar <ravi.v.shankar@intel.com>
    Cc: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: yu-cheng yu <yu-cheng.yu@intel.com>
    Link: http://lkml.kernel.org/r/1452119094-7252-2-git-send-email-yu-cheng.yu@intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    4f81cbaf
init.c 9.92 KB