mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
hv: move 3 files to lib & arch folder
move stack_protector.c/retpoline-thunk.S into lib folder move vmptable.c into arch/x86/config Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> modified: Makefile renamed: arch/x86/retpoline-thunk.S -> arch/x86/lib/retpoline-thunk.S renamed: common/stack_protector.c -> lib/stack_protector.c renamed: dm/vmptable.c -> arch/x86/configs/vmptable.c
This commit is contained in:
committed by
ACRN System Integration
parent
7d44cd5c28
commit
8338cd463b
37
hypervisor/arch/x86/lib/retpoline-thunk.S
Normal file
37
hypervisor/arch/x86/lib/retpoline-thunk.S
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
.macro retpoline_thunk reg:req
|
||||
|
||||
.align 8
|
||||
.global __x86_indirect_thunk_\reg
|
||||
__x86_indirect_thunk_\reg:
|
||||
call 22f
|
||||
11:
|
||||
pause
|
||||
jmp 11b
|
||||
22:
|
||||
mov %\reg, (%rsp)
|
||||
ret
|
||||
.endm
|
||||
|
||||
.section .retpoline_thunk, "ax"
|
||||
|
||||
retpoline_thunk rax
|
||||
retpoline_thunk rbx
|
||||
retpoline_thunk rcx
|
||||
retpoline_thunk rdx
|
||||
retpoline_thunk rdi
|
||||
retpoline_thunk rsi
|
||||
retpoline_thunk rbp
|
||||
retpoline_thunk r8
|
||||
retpoline_thunk r9
|
||||
retpoline_thunk r10
|
||||
retpoline_thunk r11
|
||||
retpoline_thunk r12
|
||||
retpoline_thunk r13
|
||||
retpoline_thunk r14
|
||||
retpoline_thunk r15
|
Reference in New Issue
Block a user