lkml.org 
[lkml]   [2022]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V6 3/8] x86/entry: Move PUSH_AND_CLEAR_REGS out of error_entry()
On Mon, May 02, 2022 at 02:42:50PM +0200, Juergen Gross wrote:
> I think you could avoid the extra call/ret by doing something like:
>
> SYM_CODE_START_LOCAL(error_exit_push_and_save)
> UNWIND_HINT_FUNC
> PUSH_AND_CLEAR_REGS save_ret=1
> ENCODE_FRAME_POINTER 8
> jmp error_exit
> SYM_CODE_END(error_exit_push_and_save)
>
> ... and use this instead of patch 5:
>
> ALTERNATIVE "call error_entry_push_and_save; movq %rax, %rsp", \
> "call push_and_clear_regs", X86_FEATURE_XENPV

I'm afraid I can't follow - you still need to call error_entry on
!XENPV. You have a function error_entry_push_and_save() but above it is
called error_*exit*_push_and_save...

Bottomline is, this should be as simple as possible code - an additional
CALL/RET doesn't really matter, perf-wise.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2022-05-02 20:10    [W:0.053 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site