Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2018 19:09:40 +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: r338113 - head/sys/amd64/amd64
Message-ID:  <201808201909.w7KJ9e9O065107@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Aug 20 19:09:39 2018
New Revision: 338113
URL: https://svnweb.freebsd.org/changeset/base/338113

Log:
  Update comment about ABI of flush_l1s_sw to match the reality.
  
  CPUID instruction clobbers %rbx and %rdx.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	13 days

Modified:
  head/sys/amd64/amd64/support.S

Modified: head/sys/amd64/amd64/support.S
==============================================================================
--- head/sys/amd64/amd64/support.S	Mon Aug 20 19:07:57 2018	(r338112)
+++ head/sys/amd64/amd64/support.S	Mon Aug 20 19:09:39 2018	(r338113)
@@ -1230,9 +1230,9 @@ END(handle_ibrs_exit_rs)
  * Flush L1D cache.  Load enough of the data from the kernel text
  * to flush existing L1D content.
  *
- * N.B. The function follows ABI calling conventions, but the vmm.ko
- * caller expects that only %rax, %rcx, %r9, and %rflags registers
- * are clobbered.
+ * N.B. The function does not follow ABI calling conventions, it corrupts %rbx.
+ * The vmm.ko caller expects that only %rax, %rdx, %rbx, %rcx, %r9, and %rflags
+ * registers are clobbered.  The NMI handler caller only needs %r13 preserved.
  */
 ENTRY(flush_l1d_sw)
 #define	L1D_FLUSH_SIZE	(64 * 1024)



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