Module Name: src
Committed By: martin
Date: Thu Oct 30 18:58:45 UTC 2014
Modified Files:
src/sys/arch/x86/x86 [netbsd-7]: identcpu.c
Log Message:
Pull up following revision(s) (requested by riz in ticket #171):
sys/arch/x86/x86/identcpu.c: revision 1.46
sys/arch/x86/x86/identcpu.c: revision 1.47
Force x86_xsave_features to 0 when running under XEN.
This prevents the use of xsave and xrstor thus fixing
the problem in PR/49150. The basic problem is that the way AMD
implements those instructions means that information can leak
between domains so XEN treats them as privileged.
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.45.2.1 src/sys/arch/x86/x86/identcpu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.45 src/sys/arch/x86/x86/identcpu.c:1.45.2.1
--- src/sys/arch/x86/x86/identcpu.c:1.45 Tue Jul 8 19:35:36 2014
+++ src/sys/arch/x86/x86/identcpu.c Thu Oct 30 18:58:45 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: identcpu.c,v 1.45 2014/07/08 19:35:36 msaitoh Exp $ */
+/* $NetBSD: identcpu.c,v 1.45.2.1 2014/10/30 18:58:45 martin Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.45 2014/07/08 19:35:36 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.45.2.1 2014/10/30 18:58:45 martin Exp $");
#include "opt_xen.h"
@@ -757,7 +757,9 @@ cpu_probe_fpu(struct cpu_info *ci)
/* XXX these probably ought to be per-cpu */
if (descs[2] > 512)
x86_fpu_save_size = descs[2];
+#ifndef XEN
x86_xsave_features = (uint64_t)descs[3] << 32 | descs[0];
+#endif
}
void