Re: [PATCH v3 12/75] x86/boot/compressed/64: Switch to __KERNEL_CS after GDT is loaded

2020-05-04 Thread Joerg Roedel
On Mon, May 04, 2020 at 12:41:29PM +0200, Borislav Petkov wrote: > On Tue, Apr 28, 2020 at 05:16:22PM +0200, Joerg Roedel wrote: > > + /* Reload CS so IRET returns to a CS actually in the GDT */ > > + pushq $__KERNEL_CS > > + leaq.Lon_kernel_cs(%rip), %rax > > + pushq %rax > > +

Re: [PATCH v3 12/75] x86/boot/compressed/64: Switch to __KERNEL_CS after GDT is loaded

2020-05-04 Thread Borislav Petkov
On Tue, Apr 28, 2020 at 05:16:22PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > When the pre-decompression code loads its first GDT in startup_64, it is > still running on the CS value of the previous GDT. In the case of SEV-ES > this is the EFI GDT. > > To make exception handling work

[PATCH v3 12/75] x86/boot/compressed/64: Switch to __KERNEL_CS after GDT is loaded

2020-04-28 Thread Joerg Roedel
From: Joerg Roedel When the pre-decompression code loads its first GDT in startup_64, it is still running on the CS value of the previous GDT. In the case of SEV-ES this is the EFI GDT. To make exception handling work (especially IRET) the CPU needs to switch to a CS value in the current GDT,