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 co mpat mode in trampoline start64() if not needed
On January 25, 2024 1:57:18 AM PST, Andi Kleen <ak@linux.intel.com> wrote:
>> + /* Paging mode is correct proceed in 64-bit mode */
>> +
>> + LOCK_AND_LOAD_REALMODE_ESP lock_rip=1
>> +
>> + movw $__KERNEL_DS, %dx
>> + movl %edx, %ss
>> + addl $pa_real_mode_base, %esp
>> + movl %edx, %ds
>> + movl %edx, %es
>> + movl %edx, %fs
>> + movl %edx, %gs
>> +
>> + movl $pa_trampoline_pgd, %eax
>> + movq %rax, %cr3
>> +
>> + jmpq *tr_start(%rip)
>
>Still think we should add a far jump here so that we run on a defined
>code segment. It probably doesn't matter since there are likely no
>IRETs before reloading anyways, but it seems cleaner.
>
>-Andi
>

Agreed.

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