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
> > +
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
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,