Module Name: src
Committed By: maxv
Date: Wed May 15 18:27:51 UTC 2019
Modified Files:
src/sys/arch/amd64/amd64: locore.S
src/sys/arch/i386/i386: locore.S
src/sys/arch/x86/x86: identcpu.c
Log Message:
Enable EagerFPU on Xen PV. Should work as-is. Sent on port-amd64@.
To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/sys/arch/amd64/amd64/locore.S
cvs rdiff -u -r1.166 -r1.167 src/sys/arch/i386/i386/locore.S
cvs rdiff -u -r1.88 -r1.89 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/amd64/amd64/locore.S
diff -u src/sys/arch/amd64/amd64/locore.S:1.182 src/sys/arch/amd64/amd64/locore.S:1.183
--- src/sys/arch/amd64/amd64/locore.S:1.182 Wed May 15 17:31:41 2019
+++ src/sys/arch/amd64/amd64/locore.S Wed May 15 18:27:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.182 2019/05/15 17:31:41 maxv Exp $ */
+/* $NetBSD: locore.S,v 1.183 2019/05/15 18:27:51 maxv Exp $ */
/*
* Copyright-o-rama!
@@ -1147,7 +1147,6 @@ ENTRY(cpu_switchto)
movq %r12,%rsi
callq _C_LABEL(x86_dbregs_switch)
-#ifndef XENPV
movb _C_LABEL(x86_fpu_eager),%dl
testb %dl,%dl
jz .Lno_eagerfpu
@@ -1155,7 +1154,6 @@ ENTRY(cpu_switchto)
movq %r12,%rsi
callq _C_LABEL(fpu_eagerswitch)
.Lno_eagerfpu:
-#endif
/* Don't bother with the rest if switching to a system process. */
testl $LW_SYSTEM,L_FLAG(%r12)
Index: src/sys/arch/i386/i386/locore.S
diff -u src/sys/arch/i386/i386/locore.S:1.166 src/sys/arch/i386/i386/locore.S:1.167
--- src/sys/arch/i386/i386/locore.S:1.166 Sat Mar 9 08:42:25 2019
+++ src/sys/arch/i386/i386/locore.S Wed May 15 18:27:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.166 2019/03/09 08:42:25 maxv Exp $ */
+/* $NetBSD: locore.S,v 1.167 2019/05/15 18:27:51 maxv Exp $ */
/*
* Copyright-o-rama!
@@ -128,7 +128,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.166 2019/03/09 08:42:25 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.167 2019/05/15 18:27:51 maxv Exp $");
#include "opt_copy_symtab.h"
#include "opt_ddb.h"
@@ -1137,7 +1137,6 @@ skip_save:
call _C_LABEL(x86_dbregs_switch)
addl $8,%esp
-#ifndef XENPV
pushl %edx
movb _C_LABEL(x86_fpu_eager),%dl
testb %dl,%dl
@@ -1148,7 +1147,6 @@ skip_save:
addl $8,%esp
.Lno_eagerfpu:
popl %edx
-#endif
/* Don't bother with the rest if switching to a system process. */
testl $LW_SYSTEM,L_FLAG(%edi)
Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.88 src/sys/arch/x86/x86/identcpu.c:1.89
--- src/sys/arch/x86/x86/identcpu.c:1.88 Mon Feb 11 18:50:15 2019
+++ src/sys/arch/x86/x86/identcpu.c Wed May 15 18:27:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: identcpu.c,v 1.88 2019/02/11 18:50:15 cherry Exp $ */
+/* $NetBSD: identcpu.c,v 1.89 2019/05/15 18:27:51 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.88 2019/02/11 18:50:15 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.89 2019/05/15 18:27:51 maxv Exp $");
#include "opt_xen.h"
@@ -744,7 +744,6 @@ cpu_probe_old_fpu(struct cpu_info *ci)
#endif
}
-#ifndef XENPV
static void
cpu_probe_fpu_leak(struct cpu_info *ci)
{
@@ -786,16 +785,13 @@ cpu_probe_fpu_leak(struct cpu_info *ci)
break;
}
}
-#endif
static void
cpu_probe_fpu(struct cpu_info *ci)
{
u_int descs[4];
-#ifndef XENPV
cpu_probe_fpu_leak(ci);
-#endif
x86_fpu_save = FPU_SAVE_FSAVE;