svn commit: r339333 - head/sys/amd64/amd64

Konstantin Belousov kib at FreeBSD.org
Fri Oct 12 16:00:22 UTC 2018


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)];


More information about the svn-src-head mailing list