[kernel] r16124 - in dists/sid/linux-2.6/debian: . patches/bugfix/x86 patches/series

Ben Hutchings benh at alioth.debian.org
Thu Aug 12 02:25:34 UTC 2010


Author: benh
Date: Thu Aug 12 02:25:32 2010
New Revision: 16124

Log:
xen: Completely disable use of XSAVE (Closes: #592428)

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/x86/xen-just-completely-disable-xsave.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/20

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Thu Aug 12 01:09:44 2010	(r16123)
+++ dists/sid/linux-2.6/debian/changelog	Thu Aug 12 02:25:32 2010	(r16124)
@@ -24,6 +24,7 @@
     (Closes: #589077)
   * IB/ipath: Fix probe failure path (Closes: #579393)
   * ext4: fix freeze deadlock under IO (regression introduced in 2.6.32.17)
+  * xen: Completely disable use of XSAVE (Closes: #592428)
 
   [ Martin Michlmayr ]
   * [armel/orion5x] Add a missing #include to fix a build issue.

Added: dists/sid/linux-2.6/debian/patches/bugfix/x86/xen-just-completely-disable-xsave.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/x86/xen-just-completely-disable-xsave.patch	Thu Aug 12 02:25:32 2010	(r16124)
@@ -0,0 +1,43 @@
+From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+Date: Wed, 11 Aug 2010 08:44:01 -0700
+Subject: [PATCH] xen: just completely disable XSAVE
+
+Some (old) versions of Xen just kill the domain if it tries to set any
+unknown bits in CR4, so we can't reliably probe for OSXSAVE in
+CR4.
+
+Since Xen doesn't support XSAVE for guests at the moment, and no such
+support is being worked on, there's no downside in just unconditionally
+masking XSAVE support.
+
+Signed-off-by: Jeremy Fitzhardinge<jeremy.fitzhardinge at citrix.com>
+
+diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
+index 65d8d79..5292fa5 100644
+--- a/arch/x86/xen/enlighten.c
++++ b/arch/x86/xen/enlighten.c
+@@ -227,23 +227,7 @@ static __init void xen_init_cpuid_mask(void)
+ 			~((1 << X86_FEATURE_APIC) |  /* disable local APIC */
+ 			  (1 << X86_FEATURE_ACPI));  /* disable ACPI */
+ 
+-	ax = 1;
+-	cx = 0;
+-	xen_cpuid(&ax, &bx, &cx, &dx);
+-
+-	/* cpuid claims we support xsave; try enabling it to see what happens */
+-	if (cx & (1 << (X86_FEATURE_XSAVE % 32))) {
+-		unsigned long cr4;
+-
+-		set_in_cr4(X86_CR4_OSXSAVE);
+-		
+-		cr4 = read_cr4();
+-
+-		if ((cr4 & X86_CR4_OSXSAVE) == 0)
+-			cpuid_leaf1_ecx_mask &= ~(1 << (X86_FEATURE_XSAVE % 32));
+-
+-		clear_in_cr4(X86_CR4_OSXSAVE);
+-	}
++	cpuid_leaf1_ecx_mask &= ~(1 << (X86_FEATURE_XSAVE % 32)); /* disable XSAVE */
+ }
+ 
+ static void xen_set_debugreg(int reg, unsigned long val)

Modified: dists/sid/linux-2.6/debian/patches/series/20
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/20	Thu Aug 12 01:09:44 2010	(r16123)
+++ dists/sid/linux-2.6/debian/patches/series/20	Thu Aug 12 02:25:32 2010	(r16124)
@@ -27,3 +27,4 @@
 + bugfix/all/ipath-Fix-probe-failure-path.patch
 + bugfix/all/ext4-fix-freeze-deadlock-under-IO.patch
 + bugfix/all/can-add-limit-for-nframes-and-clean-up-signed-variables.patch
++ bugfix/x86/xen-just-completely-disable-xsave.patch



More information about the Kernel-svn-changes mailing list