On 22.08.2022 15:12, Andrew Cooper wrote:
> early_page_fault() needs to outside of #ifdef CONFIG_PV
> 
> Spotted by Gitlab CI.
> 
> Fixes: fe3f50726e87 ("x86/entry: move .init.text section higher up in the 
> code for readability")
> Signed-off-by: Andrew Cooper <[email protected]>

Makes me wonder whether the original change then really was worth it.

> --- a/xen/arch/x86/x86_64/entry.S
> +++ b/xen/arch/x86/x86_64/entry.S
> @@ -22,6 +22,17 @@
>  #endif
>  .endm
>  
> +        .section .init.text, "ax", @progbits
> +ENTRY(early_page_fault)
> +        ENDBR64
> +        movl  $TRAP_page_fault, 4(%rsp)
> +        SAVE_ALL
> +        movq  %rsp, %rdi
> +        call  do_early_page_fault
> +        jmp   restore_all_xen
> +
> +        .text
> +
>  #ifdef CONFIG_PV
>  /* %rbx: struct vcpu */
>  switch_to_kernel:

Rather than putting it at the very top of the file, may I suggest to put
it immediately after

/* --- CODE BELOW THIS LINE (MOSTLY) NOT GUEST RELATED --- */

or yet a few more lines down between continue_pv_domain and
restore_all_xen? Which, as a minor gain, then also doesn't require you
to add a new .text (or other section) directive. Preferably that way
Acked-by: Jan Beulich <[email protected]>

Jan

Reply via email to