From 6d602218df5f7752ba020b0014e46e612202c9f0 Mon Sep 17 00:00:00 2001 From: bouyer Date: Sat, 1 Feb 2014 18:57:38 +0000 Subject: [PATCH] Stopgap measure: set i386_fpu_present to 1 for XEN. Stop a stream of npxintr: came from nowherenpxintr: l = 0xc17ba560, curproc = 0xc177d880, fpu_present = 0 when running some ATF tests: http://www-soc.lip6.fr/~bouyer/NetBSD-tests/xen/HEAD/i386/201401300920Z_anita.txt XXX this is probably still broken for native i386, at last for older CPUs. It looks like on newer CPUs (such as the one emulated by qemu) this code path is not used. --- sys/arch/i386/i386/machdep.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index ae1fc977c848..be2247c4ab6a 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.743 2014/01/26 19:16:17 dsl Exp $ */ +/* $NetBSD: machdep.c,v 1.744 2014/02/01 18:57:38 bouyer Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009 @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.743 2014/01/26 19:16:17 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.744 2014/02/01 18:57:38 bouyer Exp $"); #include "opt_beep.h" #include "opt_compat_ibcs2.h" @@ -229,7 +229,11 @@ struct mtrr_funcs *mtrr_funcs; int cpu_class; int use_pae; +#ifdef XEN +int i386_fpu_present = 1; +#else int i386_fpu_present; +#endif int i386_fpu_exception; int i386_fpu_fdivbug;