Re: [RFC v2-fix-v2 1/1] x86/boot: Add a trampoline for APs booting in 64-bit mode

From: Dan Williams
Date: Fri May 21 2021 - 14:29:54 EST


On Fri, May 21, 2021 at 7:40 AM Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx> wrote:
>
> From: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
>
> Add a trampoline for booting APs in 64-bit mode via a software handoff
> with BIOS, and use the new trampoline for the ACPI MP wake protocol used
> by TDX. You can find MADT MP wake protocol details in ACPI specification
> r6.4, sec 5.2.12.19.
>
> Extend the real mode IDT pointer by four bytes to support LIDT in 64-bit
> mode. For the GDT pointer, create a new entry as the existing storage
> for the pointer occupies the zero entry in the GDT itself.
>
> Reported-by: Kai Huang <kai.huang@xxxxxxxxx>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
> Reviewed-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
> ---
>
> Changes since RFC v2-fix:
> * Passed rmh as argument to get_trampoline_start_ip().
> * Added a comment line for get_trampoline_start_ip().
> * Moved X86_CR0_NE change from pa_trampoline_compat() to patch
> "x86/boot: Avoid #VE during boot for TDX platforms".
> * Fixed comments for tr_idt as per Dan's comments.
> * Moved TRAMPOLINE_32BIT_CODE_SIZE change to "x86/boot: Avoid #VE
> during boot for TDX platforms" patch.

Thanks, looks good, no more comments from me:

Reviewed-by: Dan Williams <dan.j.williams@xxxxxxxxx>