From: tip-bot for Suresh Siddha <suresh.b.siddha@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
suresh.b.siddha@intel.com, tglx@linutronix.de,
hpa@linux.intel.com
Subject: [tip:x86/fpu] x86, fpu: enable eagerfpu by default for xsaveopt
Date: Tue, 18 Sep 2012 17:08:28 -0700 [thread overview]
Message-ID: <tip-212b02125f3725127148475059a70031bd031bdb@git.kernel.org> (raw)
In-Reply-To: <1347300665-6209-3-git-send-email-suresh.b.siddha@intel.com>
Commit-ID: 212b02125f3725127148475059a70031bd031bdb
Gitweb: http://git.kernel.org/tip/212b02125f3725127148475059a70031bd031bdb
Author: Suresh Siddha <suresh.b.siddha@intel.com>
AuthorDate: Thu, 6 Sep 2012 15:05:18 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Tue, 18 Sep 2012 15:52:23 -0700
x86, fpu: enable eagerfpu by default for xsaveopt
xsaveopt/xrstor support optimized state save/restore by tracking the
INIT state and MODIFIED state during context-switch.
Enable eagerfpu by default for processors supporting xsaveopt.
Can be disabled by passing "eagerfpu=off" boot parameter.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/1347300665-6209-3-git-send-email-suresh.b.siddha@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
Documentation/kernel-parameters.txt | 2 +-
arch/x86/include/asm/cpufeature.h | 1 +
arch/x86/kernel/xsave.c | 3 +++
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 741d064..e8f7faa 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1834,7 +1834,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
enabling legacy floating-point and sse state.
eagerfpu= [X86]
- on enable eager fpu restore
+ on enable eager fpu restore (default for xsaveopt)
off disable eager fpu restore
nohlt [BUGS=ARM,SH] Tells the kernel that the sleep(SH) or
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index 5dd2b47..0debdb5 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -300,6 +300,7 @@ extern const char * const x86_power_flags[32];
#define cpu_has_xmm4_2 boot_cpu_has(X86_FEATURE_XMM4_2)
#define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC)
#define cpu_has_xsave boot_cpu_has(X86_FEATURE_XSAVE)
+#define cpu_has_xsaveopt boot_cpu_has(X86_FEATURE_XSAVEOPT)
#define cpu_has_osxsave boot_cpu_has(X86_FEATURE_OSXSAVE)
#define cpu_has_hypervisor boot_cpu_has(X86_FEATURE_HYPERVISOR)
#define cpu_has_pclmulqdq boot_cpu_has(X86_FEATURE_PCLMULQDQ)
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index c0afd2c..e99f754 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -557,6 +557,9 @@ static void __init xstate_enable_boot_cpu(void)
prepare_fx_sw_frame();
setup_init_fpu_buf();
+ if (cpu_has_xsaveopt && !disable_eagerfpu)
+ setup_force_cpu_cap(X86_FEATURE_EAGER_FPU);
+
pr_info("enabled xstate_bv 0x%llx, cntxt size 0x%x\n",
pcntxt_mask, xstate_size);
}
next prev parent reply other threads:[~2012-09-19 0:08 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 18:11 [PATCH v2 0/5] eagerfpu patches for tip/x86/fpu Suresh Siddha
2012-09-10 18:11 ` [PATCH v2 1/5] x86, fpu: decouple non-lazy/eager fpu restore from xsave Suresh Siddha
2012-09-17 19:11 ` Pavel Machek
2012-09-19 0:07 ` [tip:x86/fpu] x86, fpu: decouple non-lazy/ eager " tip-bot for Suresh Siddha
2012-09-10 18:11 ` [PATCH v2 2/5] x86, fpu: enable eagerfpu by default for xsaveopt Suresh Siddha
2012-09-19 0:08 ` tip-bot for Suresh Siddha [this message]
2012-09-10 18:11 ` [PATCH v2 3/5] x86, fpu: move check_fpu() after alternative_instructions() Suresh Siddha
2012-09-19 0:06 ` [tip:x86/fpu] x86, fpu: use non-lazy fpu restore for processors supporting xsave tip-bot for Suresh Siddha
2012-09-10 18:11 ` [PATCH v2 4/5] x86, fpu: make eagerfpu= boot param tri-state Suresh Siddha
2012-09-19 0:09 ` [tip:x86/fpu] " tip-bot for Suresh Siddha
2012-09-10 18:11 ` [PATCH v2 5/5] x86, fpu: remove cpu_has_xmm check in the fx_finit() Suresh Siddha
2012-09-19 0:10 ` [tip:x86/fpu] " tip-bot for Suresh Siddha
2012-09-10 18:16 ` [PATCH v2 0/5] eagerfpu patches for tip/x86/fpu Borislav Petkov
-- strict thread matches above, loose matches on Subject: below --
2012-08-24 21:12 [PATCH 0/6] x86, fpu: cleanups, introduce non-lazy FPU restore for xsave Suresh Siddha
2012-08-24 21:12 ` [PATCH 1/6] x86, fpu: drop_fpu() before restoring new state from sigframe Suresh Siddha
2012-08-24 22:13 ` [tip:x86/fpu] " tip-bot for Suresh Siddha
2012-09-19 0:01 ` tip-bot for Suresh Siddha
2012-08-24 21:12 ` [PATCH 2/6] x86, fpu: remove unnecessary user_fpu_end() in save_xstate_sig() Suresh Siddha
2012-08-24 22:14 ` [tip:x86/fpu] " tip-bot for Suresh Siddha
2012-08-26 11:30 ` [PATCH 2/6] " Borislav Petkov
2012-09-19 0:02 ` [tip:x86/fpu] " tip-bot for Suresh Siddha
2012-08-24 21:12 ` [PATCH 3/6] x86, kvm: use kernel_fpu_begin/end() in kvm_load/put_guest_fpu() Suresh Siddha
2012-08-24 22:15 ` [tip:x86/fpu] x86, kvm: use kernel_fpu_begin/end() in kvm_load/ put_guest_fpu() tip-bot for Suresh Siddha
2012-09-19 0:03 ` tip-bot for Suresh Siddha
2012-09-19 10:13 ` [PATCH 3/6] x86, kvm: use kernel_fpu_begin/end() in kvm_load/put_guest_fpu() Avi Kivity
2012-09-19 17:18 ` Suresh Siddha
2012-09-19 17:22 ` Avi Kivity
2012-09-19 17:25 ` Suresh Siddha
2012-09-20 9:31 ` Avi Kivity
2012-09-19 17:26 ` H. Peter Anvin
2012-09-20 9:36 ` Avi Kivity
2012-09-20 0:10 ` Suresh Siddha
2012-09-20 9:50 ` Avi Kivity
2012-09-20 18:01 ` Suresh Siddha
2012-09-22 0:19 ` [tip:x86/fpu] x86, kvm: fix kvm's usage of kernel_fpu_begin/end() tip-bot for Suresh Siddha
2012-08-24 21:13 ` [PATCH 4/6] x86, fpu: always use kernel_fpu_begin/end() for in-kernel FPU usage Suresh Siddha
2012-08-24 22:16 ` [tip:x86/fpu] " tip-bot for Suresh Siddha
2012-09-19 0:04 ` tip-bot for Suresh Siddha
2012-08-24 21:13 ` [PATCH 5/6] lguest, x86: handle guest TS bit for lazy/non-lazy fpu host models Suresh Siddha
2012-08-24 22:16 ` [tip:x86/fpu] lguest, x86: handle guest TS bit for lazy/ non-lazy " tip-bot for Suresh Siddha
2012-09-19 0:05 ` tip-bot for Suresh Siddha
2012-08-24 21:13 ` [PATCH 6/6] x86, fpu: use non-lazy fpu restore for processors supporting xsave Suresh Siddha
2012-08-24 22:17 ` [tip:x86/fpu] " tip-bot for Suresh Siddha
2012-08-24 21:33 ` [PATCH 0/6] x86, fpu: cleanups, introduce non-lazy FPU restore for xsave H. Peter Anvin
2012-08-25 18:34 ` Linus Torvalds
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-212b02125f3725127148475059a70031bd031bdb@git.kernel.org \
--to=suresh.b.siddha@intel.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).