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 Add #ifdef, for i386 not to panic.
details: https://anonhg.NetBSD.org/src/rev/c50925da0705
branches: trunk
changeset: 831455:c50925da0705
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Mar 31 07:15:47 2018 +0000
description:
Add #ifdef, for i386 not to panic.
diffstat:
sys/arch/x86/x86/spectre.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r f9f18c86d84f -r c50925da0705 sys/arch/x86/x86/spectre.c
--- a/sys/arch/x86/x86/spectre.c Sat Mar 31 06:34:51 2018 +0000
+++ b/sys/arch/x86/x86/spectre.c Sat Mar 31 07:15:47 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spectre.c,v 1.5 2018/03/29 07:21:24 maxv Exp $ */
+/* $NetBSD: spectre.c,v 1.6 2018/03/31 07:15:47 maxv Exp $ */
/*
* Copyright (c) 2018 NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.5 2018/03/29 07:21:24 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.6 2018/03/31 07:15:47 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -94,7 +94,12 @@
x86_cpuid(7, descs);
if (descs[3] & CPUID_SEF_IBRS) {
/* descs[3] = %edx */
+#ifdef __x86_64__
mitigation_method = MITIGATION_INTEL_IBRS;
+#else
+ /* IBRS not supported on i386. */
+ mitigation_method = MITIGATION_NONE;
+#endif
return;
}
}
Home |
Main Index |
Thread Index |
Old Index