Commit c3b03791 authored by Peter Zijlstra's avatar Peter Zijlstra
parent c4691712
...@@ -666,6 +666,7 @@ bool __raw_callee_save___native_vcpu_is_preempted(long cpu); ...@@ -666,6 +666,7 @@ bool __raw_callee_save___native_vcpu_is_preempted(long cpu);
".globl " PV_THUNK_NAME(func) ";" \ ".globl " PV_THUNK_NAME(func) ";" \
".type " PV_THUNK_NAME(func) ", @function;" \ ".type " PV_THUNK_NAME(func) ", @function;" \
PV_THUNK_NAME(func) ":" \ PV_THUNK_NAME(func) ":" \
ASM_ENDBR \
FRAME_BEGIN \ FRAME_BEGIN \
PV_SAVE_ALL_CALLER_REGS \ PV_SAVE_ALL_CALLER_REGS \
"call " #func ";" \ "call " #func ";" \
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#ifndef __ASM_QSPINLOCK_PARAVIRT_H #ifndef __ASM_QSPINLOCK_PARAVIRT_H
#define __ASM_QSPINLOCK_PARAVIRT_H #define __ASM_QSPINLOCK_PARAVIRT_H
#include <asm/ibt.h>
/* /*
* For x86-64, PV_CALLEE_SAVE_REGS_THUNK() saves and restores 8 64-bit * For x86-64, PV_CALLEE_SAVE_REGS_THUNK() saves and restores 8 64-bit
* registers. For i386, however, only 1 32-bit register needs to be saved * registers. For i386, however, only 1 32-bit register needs to be saved
...@@ -39,6 +41,7 @@ asm (".pushsection .text;" ...@@ -39,6 +41,7 @@ asm (".pushsection .text;"
".type " PV_UNLOCK ", @function;" ".type " PV_UNLOCK ", @function;"
".align 4,0x90;" ".align 4,0x90;"
PV_UNLOCK ": " PV_UNLOCK ": "
ASM_ENDBR
FRAME_BEGIN FRAME_BEGIN
"push %rdx;" "push %rdx;"
"mov $0x1,%eax;" "mov $0x1,%eax;"
......
...@@ -1029,10 +1029,11 @@ asm( ...@@ -1029,10 +1029,11 @@ asm(
".global __raw_callee_save___kvm_vcpu_is_preempted;" ".global __raw_callee_save___kvm_vcpu_is_preempted;"
".type __raw_callee_save___kvm_vcpu_is_preempted, @function;" ".type __raw_callee_save___kvm_vcpu_is_preempted, @function;"
"__raw_callee_save___kvm_vcpu_is_preempted:" "__raw_callee_save___kvm_vcpu_is_preempted:"
ASM_ENDBR
"movq __per_cpu_offset(,%rdi,8), %rax;" "movq __per_cpu_offset(,%rdi,8), %rax;"
"cmpb $0, " __stringify(KVM_STEAL_TIME_preempted) "+steal_time(%rax);" "cmpb $0, " __stringify(KVM_STEAL_TIME_preempted) "+steal_time(%rax);"
"setne %al;" "setne %al;"
"ret;" ASM_RET
".size __raw_callee_save___kvm_vcpu_is_preempted, .-__raw_callee_save___kvm_vcpu_is_preempted;" ".size __raw_callee_save___kvm_vcpu_is_preempted, .-__raw_callee_save___kvm_vcpu_is_preempted;"
".popsection"); ".popsection");
......
...@@ -41,6 +41,7 @@ extern void _paravirt_nop(void); ...@@ -41,6 +41,7 @@ extern void _paravirt_nop(void);
asm (".pushsection .entry.text, \"ax\"\n" asm (".pushsection .entry.text, \"ax\"\n"
".global _paravirt_nop\n" ".global _paravirt_nop\n"
"_paravirt_nop:\n\t" "_paravirt_nop:\n\t"
ASM_ENDBR
ASM_RET ASM_RET
".size _paravirt_nop, . - _paravirt_nop\n\t" ".size _paravirt_nop, . - _paravirt_nop\n\t"
".type _paravirt_nop, @function\n\t" ".type _paravirt_nop, @function\n\t"
...@@ -50,6 +51,7 @@ asm (".pushsection .entry.text, \"ax\"\n" ...@@ -50,6 +51,7 @@ asm (".pushsection .entry.text, \"ax\"\n"
asm (".pushsection .entry.text, \"ax\"\n" asm (".pushsection .entry.text, \"ax\"\n"
".global paravirt_ret0\n" ".global paravirt_ret0\n"
"paravirt_ret0:\n\t" "paravirt_ret0:\n\t"
ASM_ENDBR
"xor %" _ASM_AX ", %" _ASM_AX ";\n\t" "xor %" _ASM_AX ", %" _ASM_AX ";\n\t"
ASM_RET ASM_RET
".size paravirt_ret0, . - paravirt_ret0\n\t" ".size paravirt_ret0, . - paravirt_ret0\n\t"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment