Skip to contentSkip to conversation

x86 fixes

GIT PULL Ingo Molnar 1 participant 1 message May 27, 2015 x86

lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

# HEAD: e88221c50cadade0eb4f7f149f4967d760212695 x86/fpu: Disable XSAVES* support for now

This tree includes:

- a fix that disables the compacted FPU XSAVE format by disabling XSAVES support:
the fixes are too complex and the breakages ABI-affecting, so we want this to be quirked off in a robust way and backported, to make sure no broken kernel is exposed to the new hardware (which exposure is still very limited).

- an MCE printk message fix

- a documentation fix

Thanks,

Ingo

------------------>
Aravind Gopalakrishnan (1):
x86/Documentation: Update the contact email for L3 cache index disable functionality

Borislav Petkov (1):
x86/mce: Fix MCE severity messages

Ingo Molnar (1):
x86/fpu: Disable XSAVES* support for now

 Documentation/ABI/testing/sysfs-devices-system-cpu |  2 +-
 arch/x86/kernel/cpu/mcheck/mce.c                   |  7 +++++--
 arch/x86/kernel/i387.c                             | 15 +++++++++++++++
 3 files changed, 21 insertions(+), 3 deletions(-)
Documentation/ABI/testing/sysfs-devices-system-cpu +1 -1
index 99983e67c13c..da95513571ea 100644
@@ -162,7 +162,7 @@ Description:	Discover CPUs in the same CPU frequency coordination domain
 What:		/sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
 Date:		August 2008
 KernelVersion:	2.6.27
-Contact:	[email protected]
+Contact:	Linux kernel mailing list <[email protected]>
 Description:	Disable L3 cache indices
 
 		These files exist in every CPU's cache/index3 directory. Each
arch/x86/kernel/cpu/mcheck/mce.c +5 -2
index e535533d5ab8..20190bdac9d5 100644
@@ -708,6 +708,7 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
 			  struct pt_regs *regs)
 {
 	int i, ret = 0;
+	char *tmp;
 
 	for (i = 0; i < mca_cfg.banks; i++) {
 		m->status = mce_rdmsrl(MSR_IA32_MCx_STATUS(i));
@@ -716,9 +717,11 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
 			if (quirk_no_way_out)
 				quirk_no_way_out(i, m, regs);
 		}
-		if (mce_severity(m, mca_cfg.tolerant, msg, true) >=
-		    MCE_PANIC_SEVERITY)
+
+		if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
+			*msg = tmp;
 			ret = 1;
+		}
 	}
 	return ret;
 }
arch/x86/kernel/i387.c +15 -0
index 009183276bb7..6185d3141219 100644
@@ -173,6 +173,21 @@ static void init_thread_xstate(void)
 		xstate_size = sizeof(struct i387_fxsave_struct);
 	else
 		xstate_size = sizeof(struct i387_fsave_struct);
+
+	/*
+	 * Quirk: we don't yet handle the XSAVES* instructions
+	 * correctly, as we don't correctly convert between
+	 * standard and compacted format when interfacing
+	 * with user-space - so disable it for now.
+	 *
+	 * The difference is small: with recent CPUs the
+	 * compacted format is only marginally smaller than
+	 * the standard FPU state format.
+	 *
+	 * ( This is easy to backport while we are fixing
+	 *   XSAVES* support. )
+	 */
+	setup_clear_cpu_cap(X86_FEATURE_XSAVES);
 }
 
 /*