On 14.11.2024 10:08, Andrew Cooper wrote:
> By checking that the permanent trampoline fits within 1k (at the time of
> writing, it's 0x229 bytes), we can simplify the wakeup_stack handling.
> 
> Move the setup into wakeup.S, because it's rather out of place in
> trampoline.S, and change it to a local symbol.
> 
> Drop wakeup_stack_start and WAKEUP_STACK_MIN entirely.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>
with one nit:

> --- a/xen/arch/x86/boot/trampoline.S
> +++ b/xen/arch/x86/boot/trampoline.S
> @@ -156,11 +156,6 @@ GLOBAL(trampoline_xen_phys_start)
>  GLOBAL(trampoline_cpu_started)
>          .byte   0
>  
> -/* The first page of trampoline is permanent, the rest boot-time only. */
> -/* Reuse the boot trampoline on the 1st trampoline page as stack for wakeup. 
> */
> -        .equ    wakeup_stack, trampoline_start + PAGE_SIZE
> -        .global wakeup_stack
> -
>  LABEL(trampoline_perm_end, 0)
>  
>  /* From here on early boot only. */
> diff --git a/xen/arch/x86/boot/wakeup.S b/xen/arch/x86/boot/wakeup.S
> index df5ea2445739..d53f92b02463 100644
> --- a/xen/arch/x86/boot/wakeup.S
> +++ b/xen/arch/x86/boot/wakeup.S
> @@ -1,5 +1,10 @@
>          .code16
>  
> +/* The first page of trampoline is permanent, the rest boot-time only. */
> +/* Reuse the boot logic on the first trampoline page as stack for wakeup. */
> +        .equ    wakeup_stack, trampoline_start + PAGE_SIZE
> +        .local  wakeup_stack
> +
>  #define wakesym(sym) (sym - wakeup_start)

As you move it, it would be nice for the commentary to become a single
multi-line comment rather than two single-line ones.

Jan

Reply via email to