* [PATCH AUTOSEL 5.4 7/7] selftests/nolibc: use EFI -bios for LoongArch qemu
[not found] <20240116001514.214199-1-sashal@kernel.org>
@ 2024-01-16 0:15 ` Sasha Levin
2024-01-16 10:50 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2024-01-16 0:15 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Thomas Weißschuh, Willy Tarreau, Sasha Levin, masahiroy,
linux-kbuild
From: Thomas Weißschuh <linux@weissschuh.net>
[ Upstream commit bdeeeaba83682225a7bf5f100fe8652a59590d33 ]
qemu for LoongArch does not work properly with direct kernel boot.
The kernel will panic during initialization and hang without any output.
When booting in EFI mode everything work correctly.
While users most likely don't have the LoongArch EFI binary installed at
least an explicit error about 'file not found' is better than a hanging
test without output that can never succeed.
Link: https://lore.kernel.org/loongarch/1738d60a-df3a-4102-b1da-d16a29b6e06a@t-8ch.de/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20231031-nolibc-out-of-tree-v1-1-47c92f73590a@weissschuh.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Makefile | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 500edb9d9f15..33d118fbb432 100644
--- a/Makefile
+++ b/Makefile
@@ -584,6 +584,13 @@ ifdef config-build
# *config targets only - make sure prerequisites are updated, and descend
# in scripts/kconfig to make the *config target
+QEMU_BIOS_DIR = /usr/share/edk2/
+QEMU_BIOS_loongarch = $(QEMU_BIOS_DIR)/loongarch64/OVMF_CODE.fd
+
+ifneq ($(QEMU_BIOS_$(XARCH)),)
+QEMU_ARGS_BIOS = -bios $(QEMU_BIOS_$(XARCH))
+endif
+
# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
# KBUILD_DEFCONFIG may point out an alternative default configuration
# used for 'make defconfig'
@@ -1375,7 +1382,7 @@ _modinst_:
@sed 's:^:kernel/:' modules.order > $(MODLIB)/modules.order
@sed 's:^:kernel/:' modules.builtin > $(MODLIB)/modules.builtin
@cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
+ $(Q)$(MAKE) $(QEMU_ARGS_BIOS) -f $(srctree)/scripts/Makefile.modinst
# This depmod is only for convenience to give the initial
# boot a modules.dep even before / is mounted read-write. However the
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH AUTOSEL 5.4 7/7] selftests/nolibc: use EFI -bios for LoongArch qemu
2024-01-16 0:15 ` [PATCH AUTOSEL 5.4 7/7] selftests/nolibc: use EFI -bios for LoongArch qemu Sasha Levin
@ 2024-01-16 10:50 ` Masahiro Yamada
2024-01-16 11:29 ` Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2024-01-16 10:50 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, stable, Thomas Weißschuh, Willy Tarreau,
linux-kbuild
On Tue, Jan 16, 2024 at 9:15 AM Sasha Levin <sashal@kernel.org> wrote:
>
> From: Thomas Weißschuh <linux@weissschuh.net>
>
> [ Upstream commit bdeeeaba83682225a7bf5f100fe8652a59590d33 ]
>
> qemu for LoongArch does not work properly with direct kernel boot.
> The kernel will panic during initialization and hang without any output.
>
> When booting in EFI mode everything work correctly.
>
> While users most likely don't have the LoongArch EFI binary installed at
> least an explicit error about 'file not found' is better than a hanging
> test without output that can never succeed.
>
> Link: https://lore.kernel.org/loongarch/1738d60a-df3a-4102-b1da-d16a29b6e06a@t-8ch.de/
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> Acked-by: Willy Tarreau <w@1wt.eu>
> Link: https://lore.kernel.org/r/20231031-nolibc-out-of-tree-v1-1-47c92f73590a@weissschuh.net
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> Makefile | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
This backport makes me upset.
The original commit, bdeeeaba83682225a7bf5f100fe8652a59590d33,
changed tools/testing/selftests/nolibc/Makefile.
However, this backport changes the top Makefile.
What is happening in the back-port logic?
> diff --git a/Makefile b/Makefile
> index 500edb9d9f15..33d118fbb432 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -584,6 +584,13 @@ ifdef config-build
> # *config targets only - make sure prerequisites are updated, and descend
> # in scripts/kconfig to make the *config target
>
> +QEMU_BIOS_DIR = /usr/share/edk2/
> +QEMU_BIOS_loongarch = $(QEMU_BIOS_DIR)/loongarch64/OVMF_CODE.fd
> +
> +ifneq ($(QEMU_BIOS_$(XARCH)),)
> +QEMU_ARGS_BIOS = -bios $(QEMU_BIOS_$(XARCH))
> +endif
> +
> # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
> # KBUILD_DEFCONFIG may point out an alternative default configuration
> # used for 'make defconfig'
> @@ -1375,7 +1382,7 @@ _modinst_:
> @sed 's:^:kernel/:' modules.order > $(MODLIB)/modules.order
> @sed 's:^:kernel/:' modules.builtin > $(MODLIB)/modules.builtin
> @cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/
> - $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
> + $(Q)$(MAKE) $(QEMU_ARGS_BIOS) -f $(srctree)/scripts/Makefile.modinst
>
> # This depmod is only for convenience to give the initial
> # boot a modules.dep even before / is mounted read-write. However the
> --
> 2.43.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH AUTOSEL 5.4 7/7] selftests/nolibc: use EFI -bios for LoongArch qemu
2024-01-16 10:50 ` Masahiro Yamada
@ 2024-01-16 11:29 ` Sasha Levin
0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2024-01-16 11:29 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kernel, stable, Thomas Weißschuh, Willy Tarreau,
linux-kbuild
On Tue, Jan 16, 2024 at 07:50:17PM +0900, Masahiro Yamada wrote:
>On Tue, Jan 16, 2024 at 9:15 AM Sasha Levin <sashal@kernel.org> wrote:
>>
>> From: Thomas Weißschuh <linux@weissschuh.net>
>>
>> [ Upstream commit bdeeeaba83682225a7bf5f100fe8652a59590d33 ]
>>
>> qemu for LoongArch does not work properly with direct kernel boot.
>> The kernel will panic during initialization and hang without any output.
>>
>> When booting in EFI mode everything work correctly.
>>
>> While users most likely don't have the LoongArch EFI binary installed at
>> least an explicit error about 'file not found' is better than a hanging
>> test without output that can never succeed.
>>
>> Link: https://lore.kernel.org/loongarch/1738d60a-df3a-4102-b1da-d16a29b6e06a@t-8ch.de/
>> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>> Acked-by: Willy Tarreau <w@1wt.eu>
>> Link: https://lore.kernel.org/r/20231031-nolibc-out-of-tree-v1-1-47c92f73590a@weissschuh.net
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>> ---
>> Makefile | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>
>
>
>
>This backport makes me upset.
>
>The original commit, bdeeeaba83682225a7bf5f100fe8652a59590d33,
>changed tools/testing/selftests/nolibc/Makefile.
>
>
>However, this backport changes the top Makefile.
>
>
>What is happening in the back-port logic?
I'm... not entierly sure. This wasn't hand massaged.
I'll drop it from everywhere.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-16 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240116001514.214199-1-sashal@kernel.org>
2024-01-16 0:15 ` [PATCH AUTOSEL 5.4 7/7] selftests/nolibc: use EFI -bios for LoongArch qemu Sasha Levin
2024-01-16 10:50 ` Masahiro Yamada
2024-01-16 11:29 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox