1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Common place for both 32- and 64-bit entry 4 */ 5 6 #include <linux/export.h> 7 #include <linux/linkage.h> 8 #include <asm/msr-index.h> 9 #include <asm/unwind_hints.h> 10 #include <asm/segment.h> 11 #include <asm/cache.h> 12 #include <asm/cpufeatures.h> 13 #include <asm/nospec-branch.h> 14 15 #include "calling.h" 16 17 .pushsection .noinstr.text, "ax" 18 19 SYM_FUNC_START(entry_ibpb) 20 movl $MSR_IA32_PRED_CMD, %ecx 21 movl $PRED_CMD_IBPB, %eax 22 xorl %edx, %edx 23 wrmsr 24 25 /* Make sure IBPB clears return stack 26 FILL_RETURN_BUFFER %rax, RSB_CLEAR_LOO 27 RET 28 SYM_FUNC_END(entry_ibpb) 29 /* For KVM */ 30 EXPORT_SYMBOL_GPL(entry_ibpb); 31 32 .popsection 33 34 /* 35 * Define the VERW operand that is disguised a 36 * it can be referenced with KPTI enabled. Thi 37 * used late in exit-to-user path after page t 38 */ 39 .pushsection .entry.text, "ax" 40 41 .align L1_CACHE_BYTES, 0xcc 42 SYM_CODE_START_NOALIGN(mds_verw_sel) 43 UNWIND_HINT_UNDEFINED 44 ANNOTATE_NOENDBR 45 .word __KERNEL_DS 46 .align L1_CACHE_BYTES, 0xcc 47 SYM_CODE_END(mds_verw_sel); 48 /* For KVM */ 49 EXPORT_SYMBOL_GPL(mds_verw_sel); 50 51 .popsection 52 53 THUNK warn_thunk_thunk, __warn_thunk
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.