From owner-svn-src-head@freebsd.org Fri Oct 12 16:00:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1444510C299E; Fri, 12 Oct 2018 16:00:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B095989CA2; Fri, 12 Oct 2018 16:00:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5C1821861; Fri, 12 Oct 2018 16:00:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9CG0Lxl010724; Fri, 12 Oct 2018 16:00:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9CG0LLj010723; Fri, 12 Oct 2018 16:00:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201810121600.w9CG0LLj010723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 12 Oct 2018 16:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339333 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 339333 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2018 16:00:22 -0000 Author: kib Date: Fri Oct 12 16:00:21 2018 New Revision: 339333 URL: https://svnweb.freebsd.org/changeset/base/339333 Log: Call initializecpucache() before ifuncs are resolved. The function tweaks CPU capabilities based on the VM platform and tunables, which affected selection of the cache flush method before ifuncs were used, and should affect the cache flush in the same way after ifunc. PR: 232081 Reported by: phk Analyzed by: avg Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Fri Oct 12 15:51:41 2018 (r339332) +++ head/sys/amd64/amd64/machdep.c Fri Oct 12 16:00:21 2018 (r339333) @@ -1575,11 +1575,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) identify_cpu1(); identify_hypervisor(); - /* - * hw.cpu_stdext_disable is ignored by the call, it will be - * re-evaluted by the below call to finishidentcpu(). - */ identify_cpu2(); + initializecpucache(); /* * Check for pti, pcid, and invpcid before ifuncs are @@ -1727,7 +1724,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) finishidentcpu(); /* Final stage of CPU initialization */ initializecpu(); /* Initialize CPU registers */ - initializecpucache(); /* doublefault stack space, runs on ist1 */ common_tss[0].tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)];