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 Disable x86 in-kernel AES temporarily.
details: https://anonhg.NetBSD.org/src/rev/4b0dcc1a6ef5
branches: trunk
changeset: 936170:4b0dcc1a6ef5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Jul 20 15:11:29 2020 +0000
description:
Disable x86 in-kernel AES temporarily.
There's a bug in the FPU state handling that it triggers -- likely
limited to the softint path since I've only ever seen it on a system
using wifi configured with WPA2 and CCMP, which uses AES heavily in
softint.
This is to be reverted once we diagnose the bug. (There is also a
performance regression on wifi with WPA2 and CCMP, which I plan to
fix too once we figure out the FPU state handling bug.)
diffstat:
sys/arch/x86/x86/identcpu.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (47 lines):
diff -r cce8aa7b4ab6 -r 4b0dcc1a6ef5 sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c Mon Jul 20 15:10:35 2020 +0000
+++ b/sys/arch/x86/x86/identcpu.c Mon Jul 20 15:11:29 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: identcpu.c,v 1.111 2020/06/29 23:51:35 riastradh Exp $ */
+/* $NetBSD: identcpu.c,v 1.112 2020/07/20 15:11:29 riastradh 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.111 2020/06/29 23:51:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.112 2020/07/20 15:11:29 riastradh Exp $");
#include "opt_xen.h"
@@ -1000,18 +1000,24 @@
/* Early patch of text segment. */
x86_patch(true);
#endif
+ /*
+ * XXX There is a bug with FPU in kernel that we
+ * haven't been able to track down yet, and all of the
+ * accelerated AES code relies on that, so it is
+ * disabled temporarily while we diagnose the bug.
+ */
#ifdef __x86_64__ /* not yet implemented on i386 */
- if (cpu_feature[1] & CPUID2_AES)
+ if (0 & cpu_feature[1] & CPUID2_AES)
aes_md_init(&aes_ni_impl);
else
#endif
- if (cpu_feature[4] & CPUID_VIA_HAS_ACE)
+ if (0 & cpu_feature[4] & CPUID_VIA_HAS_ACE)
aes_md_init(&aes_via_impl);
- else if (i386_has_sse && i386_has_sse2 &&
+ else if (0 & i386_has_sse && i386_has_sse2 &&
(cpu_feature[1] & CPUID2_SSE3) &&
(cpu_feature[1] & CPUID2_SSSE3))
aes_md_init(&aes_ssse3_impl);
- else if (i386_has_sse && i386_has_sse2)
+ else if (0 & i386_has_sse && i386_has_sse2)
aes_md_init(&aes_sse2_impl);
} else {
/*
Home |
Main Index |
Thread Index |
Old Index