Merge tag 'x86_urgent_for_v6.4_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Borislav Petkov:

- Set up the kernel CS earlier in the boot process in case EFI boots
the kernel after bypassing the decompressor and the CS descriptor
used ends up being the EFI one which is not mapped in the identity
page table, leading to early SEV/SNP guest communication exceptions
resulting in the guest crashing

* tag 'x86_urgent_for_v6.4_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/head/64: Switch to KERNEL_CS as soon as new GDT is installed

Changed files
+9 -9
arch
x86
kernel
+9 -9
arch/x86/kernel/head_64.S
··· 77 77 call startup_64_setup_env 78 78 popq %rsi 79 79 80 + /* Now switch to __KERNEL_CS so IRET works reliably */ 81 + pushq $__KERNEL_CS 82 + leaq .Lon_kernel_cs(%rip), %rax 83 + pushq %rax 84 + lretq 85 + 86 + .Lon_kernel_cs: 87 + UNWIND_HINT_END_OF_STACK 88 + 80 89 #ifdef CONFIG_AMD_MEM_ENCRYPT 81 90 /* 82 91 * Activate SEV/SME memory encryption if supported/enabled. This needs to ··· 98 89 call sme_enable 99 90 popq %rsi 100 91 #endif 101 - 102 - /* Now switch to __KERNEL_CS so IRET works reliably */ 103 - pushq $__KERNEL_CS 104 - leaq .Lon_kernel_cs(%rip), %rax 105 - pushq %rax 106 - lretq 107 - 108 - .Lon_kernel_cs: 109 - UNWIND_HINT_END_OF_STACK 110 92 111 93 /* Sanitize CPU configuration */ 112 94 call verify_cpu