Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Fix xen. Not tested, but seems fine enough.



details:   https://anonhg.NetBSD.org/src/rev/cc6f1f4d50f2
branches:  trunk
changeset: 357281:cc6f1f4d50f2
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Nov 04 07:35:00 2017 +0000

description:
Fix xen. Not tested, but seems fine enough.

diffstat:

 sys/arch/x86/x86/fpu.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 46f78f55382c -r cc6f1f4d50f2 sys/arch/x86/x86/fpu.c
--- a/sys/arch/x86/x86/fpu.c    Sat Nov 04 07:26:35 2017 +0000
+++ b/sys/arch/x86/x86/fpu.c    Sat Nov 04 07:35:00 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu.c,v 1.21 2017/11/03 07:14:24 maxv Exp $    */
+/*     $NetBSD: fpu.c,v 1.22 2017/11/04 07:35:00 maxv Exp $    */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.  All
@@ -96,7 +96,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.21 2017/11/03 07:14:24 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.22 2017/11/04 07:35:00 maxv Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -233,6 +233,7 @@
 void
 fpuinit_mxcsr_mask(void)
 {
+#ifndef XEN
        union savefpu fpusave __aligned(16);
        u_long cr0, psl;
 
@@ -256,6 +257,12 @@
        } else {
                x86_fpu_mxcsr_mask = fpusave.sv_xmm.fx_mxcsr_mask;
        }
+#else
+       /*
+        * XXX: Does the detection above work on Xen?
+        */
+       x86_fpu_mxcsr_mask = __INITIAL_MXCSR_MASK__;
+#endif
 }
 
 /*



Home | Main Index | Thread Index | Old Index