mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for yu-cheng yu <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:x86/asm] x86/fpu: Disable XGETBV1 when no XSAVE
Date: Tue, 12 Jan 2016 04:01:11 -0800	[thread overview]
Message-ID: <tip-eb7c5f872e697b0aebd846cf3a3328d71e9decb2@git.kernel.org> (raw)
In-Reply-To: <1452119094-7252-3-git-send-email-yu-cheng.yu@intel.com>

Commit-ID:  eb7c5f872e697b0aebd846cf3a3328d71e9decb2
Gitweb:     http://git.kernel.org/tip/eb7c5f872e697b0aebd846cf3a3328d71e9decb2
Author:     yu-cheng yu <yu-cheng.yu@intel.com>
AuthorDate: Wed, 6 Jan 2016 14:24:52 -0800
Committer:  Ingo Molnar <mingo@kernel.org>
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 <yu-cheng.yu@intel.com>
Reviewed-by: Dave Hansen <dave.hansen@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-3-git-send-email-yu-cheng.yu@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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);
 }
 
 /*

  reply	other threads:[~2016-01-12 12:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 22:24 [PATCH 0/4] x86/fpu: FPU init code bugfixes yu-cheng yu
2016-01-06 22:24 ` [PATCH 1/4] x86/fpu: Fix early fpu command-line parsing yu-cheng yu
2016-01-12 12:00   ` [tip:x86/asm] x86/fpu: Fix early FPU " tip-bot for yu-cheng yu
2016-01-15 20:28     ` Borislav Petkov
2016-01-15 20:50       ` Yu-cheng Yu
2016-01-15 21:01         ` Dave Hansen
2016-01-15 21:09           ` Borislav Petkov
2016-01-06 22:24 ` [PATCH 2/4] x86/fpu: Disable XGETBV1 when no XSAVE yu-cheng yu
2016-01-12 12:01   ` tip-bot for yu-cheng yu [this message]
2016-01-06 22:24 ` [PATCH 3/4] x86/fpu: Disable MPX when eagerfpu is off yu-cheng yu
2016-01-12 12:01   ` [tip:x86/asm] " tip-bot for yu-cheng yu
2016-01-06 22:24 ` [PATCH 4/4] x86/fpu: Disable AVX " yu-cheng yu
2016-01-12 12:01   ` [tip:x86/asm] " tip-bot for yu-cheng yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-eb7c5f872e697b0aebd846cf3a3328d71e9decb2@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=quentin.casasnovas@oracle.com \
    --cc=ravi.v.shankar@intel.com \
    --cc=sai.praneeth.prakhya@intel.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=yu-cheng.yu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome