aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorFenghua Yu <fenghua.yu@intel.com>2014-05-29 14:12:31 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2014-05-29 17:24:52 -0400
commitb6f42a4a3c886bd18baf319d433a841ac9942c02 (patch)
treebd10c688b74f52c9f1f527e6d2a9bbb40b2056ef /arch
parent6229ad278ca74acdbc8bd3a3d469322a3de91039 (diff)
x86/xsaves: Add a kernel parameter noxsaves to disable xsaves/xrstors
This patch adds a kernel parameter noxsaves to disable xsaves/xrstors feature. The kernel will fall back to use xsaveopt and xrstor to save and restor xstates. By using this parameter, xsave area occupies more memory because standard form of xsave area in xsaveopt/xrstor occupies more memory than compacted form of xsave area. This patch adds a description of the kernel parameter noxsaveopt in doc. The code to support the parameter noxsaveopt has been in the kernel before. This patch just adds the description of this parameter in the doc. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Link: http://lkml.kernel.org/r/1401387164-43416-4-git-send-email-fenghua.yu@intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index e7c4b979d504..cdc95852532d 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -146,6 +146,7 @@ static int __init x86_xsave_setup(char *s)
146{ 146{
147 setup_clear_cpu_cap(X86_FEATURE_XSAVE); 147 setup_clear_cpu_cap(X86_FEATURE_XSAVE);
148 setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT); 148 setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT);
149 setup_clear_cpu_cap(X86_FEATURE_XSAVES);
149 setup_clear_cpu_cap(X86_FEATURE_AVX); 150 setup_clear_cpu_cap(X86_FEATURE_AVX);
150 setup_clear_cpu_cap(X86_FEATURE_AVX2); 151 setup_clear_cpu_cap(X86_FEATURE_AVX2);
151 return 1; 152 return 1;
@@ -159,6 +160,13 @@ static int __init x86_xsaveopt_setup(char *s)
159} 160}
160__setup("noxsaveopt", x86_xsaveopt_setup); 161__setup("noxsaveopt", x86_xsaveopt_setup);
161 162
163static int __init x86_xsaves_setup(char *s)
164{
165 setup_clear_cpu_cap(X86_FEATURE_XSAVES);
166 return 1;
167}
168__setup("noxsaves", x86_xsaves_setup);
169
162#ifdef CONFIG_X86_32 170#ifdef CONFIG_X86_32
163static int cachesize_override = -1; 171static int cachesize_override = -1;
164static int disable_x86_serial_nr = 1; 172static int disable_x86_serial_nr = 1;