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 Mmh, don't automatically set enabled=1 for ...



details:   https://anonhg.NetBSD.org/src/rev/200ceab0bc30
branches:  trunk
changeset: 832788:200ceab0bc30
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon May 28 20:18:58 2018 +0000

description:
Mmh, don't automatically set enabled=1 for SpectreV4, the actual mitigation
is not yet applied by default. Just so people can test.

diffstat:

 sys/arch/x86/x86/spectre.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 33cad8893bbb -r 200ceab0bc30 sys/arch/x86/x86/spectre.c
--- a/sys/arch/x86/x86/spectre.c        Mon May 28 19:52:18 2018 +0000
+++ b/sys/arch/x86/x86/spectre.c        Mon May 28 20:18:58 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spectre.c,v 1.18 2018/05/22 17:14:46 maxv Exp $        */
+/*     $NetBSD: spectre.c,v 1.19 2018/05/28 20:18:58 maxv Exp $        */
 
 /*
  * Copyright (c) 2018 NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.18 2018/05/22 17:14:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.19 2018/05/28 20:18:58 maxv Exp $");
 
 #include "opt_spectre.h"
 
@@ -610,6 +610,7 @@
         * cpu0 is the one that detects the method and sets the global
         * variable.
         */
+#if 0
        if (ci == &cpu_info_primary) {
                v4_detect_method();
                v4_mitigation_enabled =
@@ -617,8 +618,9 @@
                v4_set_name();
        }
        if (v4_mitigation_method != V4_MITIGATION_NONE) {
-               /* Mitigation not applied by default yet. */
+               mitigation_v4_apply_cpu(ci, true);
        }
+#endif
 }
 
 void sysctl_speculation_init(struct sysctllog **);



Home | Main Index | Thread Index | Old Index