From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752380AbcAFWbu (ORCPT ); Wed, 6 Jan 2016 17:31:50 -0500 Received: from mga11.intel.com ([192.55.52.93]:33249 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752166AbcAFWbr (ORCPT ); Wed, 6 Jan 2016 17:31:47 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,530,1444719600"; d="scan'208";a="854940681" From: yu-cheng yu To: linux-kernel@vger.kernel.org Cc: yu-cheng yu , x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Dave Hansen , Ingo Molnar , Borislav Petkov , Sai Praneeth Prakhya , "Ravi V. Shankar" , Fenghua Yu Subject: [PATCH 0/4] x86/fpu: FPU init code bugfixes Date: Wed, 6 Jan 2016 14:24:50 -0800 Message-Id: <1452119094-7252-1-git-send-email-yu-cheng.yu@intel.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function fpu__init_system() is executed before parse_early_param(). This causes wrong fpu configuration. In addition, there are three related issues: 1. XGETBV1 is enabled when noxsave is given 2. MPX is enabled when eagerfpu=off is given 3. AVX is enabled when eagerfpu=off is given Issues 1 and 3 are existing bugs. Issue 2 is a fallout from the command-line parsing move. The following four patches fix these issues. yu-cheng yu (4): x86/fpu: Fix early fpu command-line parsing. x86/fpu: Disable XGETBV1 when no XSAVE. x86/fpu: Disable MPX when eagerfpu is off. x86/fpu: Disable AVX when eagerfpu is off. arch/x86/include/asm/fpu/internal.h | 1 + arch/x86/include/asm/fpu/xstate.h | 11 +-- arch/x86/kernel/fpu/init.c | 161 +++++++++++++++++++----------------- arch/x86/kernel/fpu/xstate.c | 4 +- 4 files changed, 92 insertions(+), 85 deletions(-) Signed-off-by: Yu-cheng Yu Cc: x86@kernel.org Cc: H. Peter Anvin Cc: Thomas Gleixner Cc: Dave Hansen Cc: Ingo Molnar Cc: Borislav Petkov Cc: Sai Praneeth Prakhya Cc: Ravi V. Shankar Cc: Fenghua Yu -- 1.9.1