lkml.org 
[lkml]   [2024]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv3, RESEND] x86/trampoline: Bypass compat mode in trampoline_start64() if not needed
> I think it is cleaner to switch to IRET here. Does this work for you?
>
> diff --git a/arch/x86/realmode/rm/trampoline_64.S b/arch/x86/realmode/rm/trampoline_64.S
> index 608f108cba7d..14d9c7daf90f 100644
> --- a/arch/x86/realmode/rm/trampoline_64.S
> +++ b/arch/x86/realmode/rm/trampoline_64.S
> @@ -243,7 +243,9 @@ SYM_CODE_START(trampoline_start64)
> movl $pa_trampoline_pgd, %eax
> movq %rax, %cr3
>
> - jmpq *tr_start(%rip)
> + pushq $__KERNEL_CS
> + pushq tr_start(%rip)
> + lretq

Looks good. Thanks.

-Andi

\
 
 \ /
  Last update: 2024-05-27 14:33    [W:0.041 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site