From a997bcc015079e5c3390d0ffe0e015dafa437ade Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 20 Aug 2018 19:09:39 +0000 Subject: [PATCH] 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 --- sys/amd64/amd64/support.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 0547bbeabc0b..e010c4eef64c 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -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)