Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2018 16:00:21 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339333 - head/sys/amd64/amd64
Message-ID:  <201810121600.w9CG0LLj010723@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810121600.w9CG0LLj010723>