lkml.org 
[lkml]   [2020]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 31/75] x86/head/64: Reload GDT after switch to virtual addresses
    Date
    From: Joerg Roedel <jroedel@suse.de>

    Reload the GDT after switching to virtual addresses to make sure it will
    not go away when the lower mappings are removed. This will also reload
    the GDT for booting APs, which will need a working GDT too to handle #VC
    exceptions.

    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    ---
    arch/x86/kernel/head_64.S | 5 +++++
    1 file changed, 5 insertions(+)

    diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
    index 473e60a12e2f..87ea9f540608 100644
    --- a/arch/x86/kernel/head_64.S
    +++ b/arch/x86/kernel/head_64.S
    @@ -164,6 +164,11 @@ SYM_CODE_START(secondary_startup_64)
    1:
    UNWIND_HINT_EMPTY

    + /* Setup boot GDT descriptor and load boot GDT */
    + leaq boot_gdt(%rip), %rax
    + movq %rax, boot_gdt_descr+2(%rip)
    + lgdt boot_gdt_descr(%rip)
    +
    /* Check if nx is implemented */
    movl $0x80000001, %eax
    cpuid
    --
    2.27.0
    \
     
     \ /
      Last update: 2020-07-14 14:11    [W:2.444 / U:0.312 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site