lkml.org 
[lkml]   [2021]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V6 43/49] x86/doublefault: Use C entry code
    Date
    From: Lai Jiangshan <laijs@linux.alibaba.com>

    Use DEFINE_IDTENTRY_IST_ENTRY_ERRORCODE to emit C entry function and
    use the function directly in entry_64.S.

    Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
    ---
    arch/x86/entry/entry_64.S | 12 ++----------
    arch/x86/include/asm/idtentry.h | 1 +
    2 files changed, 3 insertions(+), 10 deletions(-)

    diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
    index cc552e23d691..5a9738218722 100644
    --- a/arch/x86/entry/entry_64.S
    +++ b/arch/x86/entry/entry_64.S
    @@ -574,16 +574,8 @@ SYM_CODE_START(\asmsym)
    PUSH_AND_CLEAR_REGS
    ENCODE_FRAME_POINTER

    - /* paranoid_entry returns GS information for paranoid_exit in EBX. */
    - call paranoid_entry
    - UNWIND_HINT_REGS
    -
    - movq %rsp, %rdi /* pt_regs pointer into first argument */
    - movq ORIG_RAX(%rsp), %rsi /* get error code into 2nd argument*/
    - movq $-1, ORIG_RAX(%rsp) /* no syscall to restart */
    - call \cfunc
    -
    - call paranoid_exit
    + movq %rsp, %rdi /* pt_regs pointer */
    + call ist_\cfunc
    jmp restore_regs_and_return_to_kernel

    _ASM_NOKPROBE(\asmsym)
    diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h
    index 46b2ef021992..144f3a6d875a 100644
    --- a/arch/x86/include/asm/idtentry.h
    +++ b/arch/x86/include/asm/idtentry.h
    @@ -415,6 +415,7 @@ __visible __entry_text void ist_##func(struct pt_regs *regs) \
    * Maps to DEFINE_IDTENTRY_RAW_ERRORCODE
    */
    #define DEFINE_IDTENTRY_DF(func) \
    + DEFINE_IDTENTRY_IST_ENTRY_ERRORCODE(func) \
    DEFINE_IDTENTRY_RAW_ERRORCODE(func)

    /**
    --
    2.19.1.6.gb485710b
    \
     
     \ /
      Last update: 2021-11-26 11:30    [W:2.461 / U:0.316 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site