From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965392AbcALMCc (ORCPT ); Tue, 12 Jan 2016 07:02:32 -0500 Received: from terminus.zytor.com ([198.137.202.10]:57964 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965376AbcALMC3 (ORCPT ); Tue, 12 Jan 2016 07:02:29 -0500 Date: Tue, 12 Jan 2016 04:01:11 -0800 From: tip-bot for yu-cheng yu Message-ID: Cc: torvalds@linux-foundation.org, peterz@infradead.org, bp@alien8.de, tglx@linutronix.de, mingo@kernel.org, bp@suse.de, dave.hansen@intel.com, luto@amacapital.net, ravi.v.shankar@intel.com, dave.hansen@linux.intel.com, sai.praneeth.prakhya@intel.com, yu-cheng.yu@intel.com, quentin.casasnovas@oracle.com, hpa@zytor.com, linux-kernel@vger.kernel.org, oleg@redhat.com, fenghua.yu@intel.com Reply-To: linux-kernel@vger.kernel.org, hpa@zytor.com, quentin.casasnovas@oracle.com, yu-cheng.yu@intel.com, fenghua.yu@intel.com, oleg@redhat.com, dave.hansen@linux.intel.com, sai.praneeth.prakhya@intel.com, luto@amacapital.net, ravi.v.shankar@intel.com, bp@alien8.de, peterz@infradead.org, torvalds@linux-foundation.org, dave.hansen@intel.com, bp@suse.de, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <1452119094-7252-3-git-send-email-yu-cheng.yu@intel.com> References: <1452119094-7252-3-git-send-email-yu-cheng.yu@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/fpu: Disable XGETBV1 when no XSAVE Git-Commit-ID: eb7c5f872e697b0aebd846cf3a3328d71e9decb2 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: eb7c5f872e697b0aebd846cf3a3328d71e9decb2 Gitweb: http://git.kernel.org/tip/eb7c5f872e697b0aebd846cf3a3328d71e9decb2 Author: yu-cheng yu AuthorDate: Wed, 6 Jan 2016 14:24:52 -0800 Committer: Ingo Molnar CommitDate: Tue, 12 Jan 2016 11:51:21 +0100 x86/fpu: Disable XGETBV1 when no XSAVE When "noxsave" is given as a command-line input, the kernel should disable XGETBV1. This issue currently does not cause any actual problems. XGETBV1 is only useful if we have something using the 'init optimization' (i.e. xsaveopt, xsaves). We already clear both of those in fpu__xstate_clear_all_cpu_caps(). But this is good for completeness. Signed-off-by: Yu-cheng Yu Reviewed-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Quentin Casasnovas Cc: Ravi V. Shankar Cc: Sai Praneeth Prakhya Cc: Thomas Gleixner Cc: yu-cheng yu Link: http://lkml.kernel.org/r/1452119094-7252-3-git-send-email-yu-cheng.yu@intel.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/fpu/xstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c index 40f1002..d489f27 100644 --- a/arch/x86/kernel/fpu/xstate.c +++ b/arch/x86/kernel/fpu/xstate.c @@ -52,6 +52,7 @@ void fpu__xstate_clear_all_cpu_caps(void) setup_clear_cpu_cap(X86_FEATURE_AVX512ER); setup_clear_cpu_cap(X86_FEATURE_AVX512CD); setup_clear_cpu_cap(X86_FEATURE_MPX); + setup_clear_cpu_cap(X86_FEATURE_XGETBV1); } /*