* [boot-wrapper v5] aarch64: Start Xen on Armv8-R at EL2
@ 2024-11-27 10:23 Luca Fancellu
2024-11-28 11:03 ` Mark Rutland
0 siblings, 1 reply; 4+ messages in thread
From: Luca Fancellu @ 2024-11-27 10:23 UTC (permalink / raw)
To: mark.rutland, andre.przywara; +Cc: linux-arm-kernel
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.
The only available boot method on Armv8-R AArch64 when starting
Xen is spin table at the moment, reflect this in the build
configuration.
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
v5 changes:
- Don't allow AArch64-r + Xen + PSCI from the build system, update the commit
message.
v4 changes:
- no changes
---
Makefile.am | 1 +
arch/aarch64/boot.S | 2 +-
configure.ac | 5 +++++
3 files changed, 7 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
diff --git a/configure.ac b/configure.ac
index a433c89bd2ae..a16bc25508f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,6 +115,11 @@ AS_IF([test "x$USE_PSCI" != "xyes" -a "x$KERNEL_ES" = "x32"],
[AC_MSG_ERROR([With an AArch32 kernel, boot method must be PSCI.])]
)
+# Don't allow PSCI + Xen + aarch64-r
+AS_IF([test "x$USE_PSCI" = "xyes" -a "x$USE_ARCH" = "xaarch64-r" -a "x$X_IMAGE" != "x"],
+ [AC_MSG_ERROR([With aarch64-r and Xen, PSCI must be disabled.])]
+)
+
# Allow a user to pass --with-initrd
AC_ARG_WITH([initrd],
AS_HELP_STRING([--with-initrd], [embed an initrd in the kernel image]),
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [boot-wrapper v5] aarch64: Start Xen on Armv8-R at EL2
2024-11-27 10:23 [boot-wrapper v5] aarch64: Start Xen on Armv8-R at EL2 Luca Fancellu
@ 2024-11-28 11:03 ` Mark Rutland
2024-11-28 11:06 ` Luca Fancellu
0 siblings, 1 reply; 4+ messages in thread
From: Mark Rutland @ 2024-11-28 11:03 UTC (permalink / raw)
To: Luca Fancellu; +Cc: andre.przywara, linux-arm-kernel
On Wed, Nov 27, 2024 at 10:23:00AM +0000, 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.
>
> The only available boot method on Armv8-R AArch64 when starting
> Xen is spin table at the moment, reflect this in the build
> configuration.
>
> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
> ---
> v5 changes:
> - Don't allow AArch64-r + Xen + PSCI from the build system, update the commit
> message.
> v4 changes:
> - no changes
> ---
> Makefile.am | 1 +
> arch/aarch64/boot.S | 2 +-
> configure.ac | 5 +++++
> 3 files changed, 7 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
> diff --git a/configure.ac b/configure.ac
> index a433c89bd2ae..a16bc25508f3 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -115,6 +115,11 @@ AS_IF([test "x$USE_PSCI" != "xyes" -a "x$KERNEL_ES" = "x32"],
> [AC_MSG_ERROR([With an AArch32 kernel, boot method must be PSCI.])]
> )
>
> +# Don't allow PSCI + Xen + aarch64-r
> +AS_IF([test "x$USE_PSCI" = "xyes" -a "x$USE_ARCH" = "xaarch64-r" -a "x$X_IMAGE" != "x"],
> + [AC_MSG_ERROR([With aarch64-r and Xen, PSCI must be disabled.])]
> +)
I'll delete the comment and change the message here to:
With an AArch64-R Xen, boot method must be spin-table.
... since that's consistent with the other message above:
With an AArch32 kernel, boot method must be PSCI.
... and it's slightly nicer to tell the user what will work rather than
what won't work.
Otherwise this looks fine to me, and I will apply this shortly (with
those changes) if no-one objects.
Mark.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [boot-wrapper v5] aarch64: Start Xen on Armv8-R at EL2
2024-11-28 11:03 ` Mark Rutland
@ 2024-11-28 11:06 ` Luca Fancellu
2024-12-02 9:55 ` Mark Rutland
0 siblings, 1 reply; 4+ messages in thread
From: Luca Fancellu @ 2024-11-28 11:06 UTC (permalink / raw)
To: Mark Rutland; +Cc: Andre Przywara, linux-arm-kernel@lists.infradead.org
Hi Mark,
> On 28 Nov 2024, at 11:03, Mark Rutland <mark.rutland@arm.com> wrote:
>
> On Wed, Nov 27, 2024 at 10:23:00AM +0000, 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.
>>
>> The only available boot method on Armv8-R AArch64 when starting
>> Xen is spin table at the moment, reflect this in the build
>> configuration.
>>
>> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
>> ---
>> v5 changes:
>> - Don't allow AArch64-r + Xen + PSCI from the build system, update the commit
>> message.
>> v4 changes:
>> - no changes
>> ---
>> Makefile.am | 1 +
>> arch/aarch64/boot.S | 2 +-
>> configure.ac | 5 +++++
>> 3 files changed, 7 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
>> diff --git a/configure.ac b/configure.ac
>> index a433c89bd2ae..a16bc25508f3 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -115,6 +115,11 @@ AS_IF([test "x$USE_PSCI" != "xyes" -a "x$KERNEL_ES" = "x32"],
>> [AC_MSG_ERROR([With an AArch32 kernel, boot method must be PSCI.])]
>> )
>>
>> +# Don't allow PSCI + Xen + aarch64-r
>> +AS_IF([test "x$USE_PSCI" = "xyes" -a "x$USE_ARCH" = "xaarch64-r" -a "x$X_IMAGE" != "x"],
>> + [AC_MSG_ERROR([With aarch64-r and Xen, PSCI must be disabled.])]
>> +)
>
> I'll delete the comment and change the message here to:
>
> With an AArch64-R Xen, boot method must be spin-table.
>
> ... since that's consistent with the other message above:
>
> With an AArch32 kernel, boot method must be PSCI.
>
> ... and it's slightly nicer to tell the user what will work rather than
> what won't work.
>
> Otherwise this looks fine to me, and I will apply this shortly (with
> those changes) if no-one objects.
Sounds good to me! Thanks!
>
> Mark.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [boot-wrapper v5] aarch64: Start Xen on Armv8-R at EL2
2024-11-28 11:06 ` Luca Fancellu
@ 2024-12-02 9:55 ` Mark Rutland
0 siblings, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2024-12-02 9:55 UTC (permalink / raw)
To: Luca Fancellu; +Cc: Andre Przywara, linux-arm-kernel@lists.infradead.org
On Thu, Nov 28, 2024 at 11:06:14AM +0000, Luca Fancellu wrote:
> > On 28 Nov 2024, at 11:03, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Wed, Nov 27, 2024 at 10:23:00AM +0000, 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.
> >>
> >> The only available boot method on Armv8-R AArch64 when starting
> >> Xen is spin table at the moment, reflect this in the build
> >> configuration.
> >>
> >> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
> >> +# Don't allow PSCI + Xen + aarch64-r
> >> +AS_IF([test "x$USE_PSCI" = "xyes" -a "x$USE_ARCH" = "xaarch64-r" -a "x$X_IMAGE" != "x"],
> >> + [AC_MSG_ERROR([With aarch64-r and Xen, PSCI must be disabled.])]
> >> +)
> >
> > I'll delete the comment and change the message here to:
> >
> > With an AArch64-R Xen, boot method must be spin-table.
> >
> > ... since that's consistent with the other message above:
> >
> > With an AArch32 kernel, boot method must be PSCI.
> >
> > ... and it's slightly nicer to tell the user what will work rather than
> > what won't work.
> >
> > Otherwise this looks fine to me, and I will apply this shortly (with
> > those changes) if no-one objects.
>
> Sounds good to me! Thanks!
Thanks; applied (with those fixups).
Mark.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-02 9:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-27 10:23 [boot-wrapper v5] aarch64: Start Xen on Armv8-R at EL2 Luca Fancellu
2024-11-28 11:03 ` Mark Rutland
2024-11-28 11:06 ` Luca Fancellu
2024-12-02 9:55 ` Mark Rutland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox