Module Name: src Committed By: maxv Date: Sat Dec 17 15:23:08 UTC 2016
Modified Files: src/sys/arch/x86/x86: identcpu.c Log Message: Remove a wrong comment - the FPU save size should never be percpu -, and be more explicit about Xen. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 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.50 src/sys/arch/x86/x86/identcpu.c:1.51 --- src/sys/arch/x86/x86/identcpu.c:1.50 Fri Jan 1 19:46:48 2016 +++ src/sys/arch/x86/x86/identcpu.c Sat Dec 17 15:23:08 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.50 2016/01/01 19:46:48 tls Exp $ */ +/* $NetBSD: identcpu.c,v 1.51 2016/12/17 15:23:08 maxv 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.50 2016/01/01 19:46:48 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.51 2016/12/17 15:23:08 maxv Exp $"); #include "opt_xen.h" @@ -760,10 +760,12 @@ cpu_probe_fpu(struct cpu_info *ci) /* Get features and maximum size of the save area */ x86_cpuid(0xd, descs); - /* XXX these probably ought to be per-cpu */ if (descs[2] > 512) - x86_fpu_save_size = descs[2]; -#ifndef XEN + x86_fpu_save_size = descs[2]; + +#ifdef XEN + /* Don't use xsave, force fxsave with x86_xsave_features = 0. */ +#else x86_xsave_features = (uint64_t)descs[3] << 32 | descs[0]; #endif }