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 Use XC_HIGHPRI for SpectreV2 to reduce the ...



details:   https://anonhg.NetBSD.org/src/rev/c53c8e387c96
branches:  trunk
changeset: 841484:c53c8e387c96
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat May 18 08:54:38 2019 +0000

description:
Use XC_HIGHPRI for SpectreV2 to reduce the CPU downtime. We already do this
for MDS.

diffstat:

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

diffs (36 lines):

diff -r b6966c52c93a -r c53c8e387c96 sys/arch/x86/x86/spectre.c
--- a/sys/arch/x86/x86/spectre.c        Sat May 18 08:49:23 2019 +0000
+++ b/sys/arch/x86/x86/spectre.c        Sat May 18 08:54:38 2019 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: spectre.c,v 1.27 2019/05/14 16:59:26 maxv Exp $        */
+/*     $NetBSD: spectre.c,v 1.28 2019/05/18 08:54:38 maxv Exp $        */
 
 /*
- * Copyright (c) 2018 NetBSD Foundation, Inc.
+ * Copyright (c) 2018-2019 NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -30,11 +30,11 @@
  */
 
 /*
- * Mitigations for the SpectreV2 and SpectreV4 CPU flaws.
+ * Mitigations for the SpectreV2, SpectreV4 and MDS CPU flaws.
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.27 2019/05/14 16:59:26 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.28 2019/05/18 08:54:38 maxv Exp $");
 
 #include "opt_spectre.h"
 
@@ -328,7 +328,7 @@
 
                printf("[+] %s SpectreV2 Mitigation...",
                    enabled ? "Enabling" : "Disabling");
-               xc = xc_broadcast(0, mitigation_v2_change_cpu,
+               xc = xc_broadcast(XC_HIGHPRI, mitigation_v2_change_cpu,
                    (void *)enabled, NULL);
                xc_wait(xc);
                printf(" done!\n");



Home | Main Index | Thread Index | Old Index