diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-12-04 14:43:41 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-12-08 19:23:12 +0100 |
commit | b17c2baa305cccbd16bafa289fd743cc2db77966 (patch) | |
tree | dd6c3b4e52c2f9bb1040c6f84f59244ea7ece435 /arch/x86/kernel/paravirt.c | |
parent | f94909ceb1ed4bfdb2ada72f93236305e6d6951f (diff) | |
download | linux-stable-b17c2baa305cccbd16bafa289fd743cc2db77966.tar.gz linux-stable-b17c2baa305cccbd16bafa289fd743cc2db77966.tar.bz2 linux-stable-b17c2baa305cccbd16bafa289fd743cc2db77966.zip |
x86: Prepare inline-asm for straight-line-speculation
Replace all ret/retq instructions with ASM_RET in preparation of
making it more than a single instruction.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20211204134907.964635458@infradead.org
Diffstat (limited to 'arch/x86/kernel/paravirt.c')
-rw-r--r-- | arch/x86/kernel/paravirt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 7f7636aac620..4420499f7bb4 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c @@ -41,7 +41,7 @@ extern void _paravirt_nop(void); asm (".pushsection .entry.text, \"ax\"\n" ".global _paravirt_nop\n" "_paravirt_nop:\n\t" - "ret\n\t" + ASM_RET ".size _paravirt_nop, . - _paravirt_nop\n\t" ".type _paravirt_nop, @function\n\t" ".popsection"); @@ -51,7 +51,7 @@ asm (".pushsection .entry.text, \"ax\"\n" ".global paravirt_ret0\n" "paravirt_ret0:\n\t" "xor %" _ASM_AX ", %" _ASM_AX ";\n\t" - "ret\n\t" + ASM_RET ".size paravirt_ret0, . - paravirt_ret0\n\t" ".type paravirt_ret0, @function\n\t" ".popsection"); |