Module Name: src Committed By: maxv Date: Thu Apr 5 08:43:07 UTC 2018
Modified Files: src/sys/arch/i386/i386: machdep.c src/sys/arch/x86/x86: cpu.c Log Message: Call cpu_speculation_init on i386 too. We don't have IBRS for i386, but we do have the AMD DIS_IND method. To generate a diff of this commit: cvs rdiff -u -r1.805 -r1.806 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.154 -r1.155 src/sys/arch/x86/x86/cpu.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/i386/i386/machdep.c diff -u src/sys/arch/i386/i386/machdep.c:1.805 src/sys/arch/i386/i386/machdep.c:1.806 --- src/sys/arch/i386/i386/machdep.c:1.805 Tue Apr 3 07:20:52 2018 +++ src/sys/arch/i386/i386/machdep.c Thu Apr 5 08:43:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.805 2018/04/03 07:20:52 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.806 2018/04/05 08:43:07 maxv Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009, 2017 @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.805 2018/04/03 07:20:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.806 2018/04/05 08:43:07 maxv Exp $"); #include "opt_beep.h" #include "opt_compat_freebsd.h" @@ -1168,6 +1168,9 @@ init386(paddr_t first_avail) cpu_probe(&cpu_info_primary); cpu_init_msrs(&cpu_info_primary, true); +#ifndef XEN + cpu_speculation_init(&cpu_info_primary); +#endif #ifdef PAE use_pae = 1; Index: src/sys/arch/x86/x86/cpu.c diff -u src/sys/arch/x86/x86/cpu.c:1.154 src/sys/arch/x86/x86/cpu.c:1.155 --- src/sys/arch/x86/x86/cpu.c:1.154 Wed Apr 4 12:59:49 2018 +++ src/sys/arch/x86/x86/cpu.c Thu Apr 5 08:43:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.154 2018/04/04 12:59:49 maxv Exp $ */ +/* $NetBSD: cpu.c,v 1.155 2018/04/05 08:43:07 maxv Exp $ */ /* * Copyright (c) 2000-2012 NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.154 2018/04/04 12:59:49 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.155 2018/04/05 08:43:07 maxv Exp $"); #include "opt_ddb.h" #include "opt_mpbios.h" /* for MPDEBUG */ @@ -848,9 +848,7 @@ cpu_hatch(void *v) cpu_init_msrs(ci, true); cpu_probe(ci); -#ifdef __x86_64__ cpu_speculation_init(ci); -#endif ci->ci_data.cpu_cc_freq = cpu_info_primary.ci_data.cpu_cc_freq; /* cpu_get_tsc_freq(ci); */