[boot-wrapper v4 4/4] aarch64: Start Xen on Armv8-R at EL2

Mark Rutland mark.rutland at arm.com
Tue Nov 26 03:58:30 PST 2024


On Thu, Oct 17, 2024 at 10:55:20AM +0100, Luca Fancellu wrote:
> When bootwrapper is compiled with Xen support and it is started
> at EL2 on Armv8-R AArch64, keep the current EL and jump to the
> Xen image using the SPSR_KERNEL as spsr_el2 value.

What's the plan for booting Xen? i.e. is that using spin-table or PSCI?

I'm hesitant to expose PSCI booting to EL2 on ARMv8-R, because PSCI
doesn't really support ARMv8-R (the spec says nothing about it, and all
we're doing is providing the illusion of ARMv8-A to Linux), and Xen
would have to override the vectors anyway, so it doesn't really make
sense.

Given the latter part I'm assuming you only care about spin-table for
Xen, which is less concerning. I think we should make that more explicit
in the config options and forbid the combination of ARMv8-R + PSCI +
Xen.

Mark.

> 
> Signed-off-by: Luca Fancellu <luca.fancellu at arm.com>
> ---
> v4 changes:
>  - no changes
> ---
>  Makefile.am         | 1 +
>  arch/aarch64/boot.S | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index aecda694fd6c..a8d5c1b96822 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -127,6 +127,7 @@ XEN_CHOSEN	:= xen,xen-bootargs = \"$(XEN_CMDLINE)\";		\
>  			compatible = \"xen,linux-zimage\", \"xen,multiboot-module\"; \
>  			reg = <0x0 $(DOM0_OFFSET) 0x0 $(KERNEL_SIZE)>;	\
>  		   };
> +DEFINES		+= -DXEN
>  endif
>  
>  if INITRD
> diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S
> index 565397823cb4..3fcc63bf2437 100644
> --- a/arch/aarch64/boot.S
> +++ b/arch/aarch64/boot.S
> @@ -100,7 +100,7 @@ ASM_FUNC(jump_kernel)
>  	mov	x1, x21
>  	mov	x2, x22
>  	mov	x3, x23
> -#if defined(BOOTWRAPPER_64R)
> +#if defined(BOOTWRAPPER_64R) && !defined(XEN)
>  	// On Armv8-R Linux needs to be booted at EL1
>  	mov	x4, #SPSR_KERNEL_EL1
>  #else
> -- 
> 2.34.1
> 



More information about the linux-arm-kernel mailing list