Message ID | 20231010-nolibc-out-of-tree-v1-2-b6a263859596@weissschuh.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp163349vqb; Tue, 10 Oct 2023 05:34:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbo0ltoPu2ZAl9q97KHsgbjKfZ2ASTb3qlSBOTBkwGNcqv9YxXXJGXRvMAXHQk7+ZGbvMe X-Received: by 2002:a05:6e02:12ea:b0:351:1647:5f7e with SMTP id l10-20020a056e0212ea00b0035116475f7emr23289233iln.15.1696941290049; Tue, 10 Oct 2023 05:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696941290; cv=none; d=google.com; s=arc-20160816; b=gcbiN1yYOAN3c9a8KpuwKjQ/ZX0JntIb877voY+TlSGwQvX4wcG5qBVMQlCGDvZmB1 lI5+5fxriJqlWA9F0PiAmJailHRiudjC2/cAOKee+VD0O7X9K+u4cly5CDirwDRhFci0 zsY1Qow9oBP8E8j+9Qi/K5Jl4QzmJzNKuEWOpLrbuTewB14jAku87Gqb4UlHAyCYcZpU ZeHpB8VGo0LnbN6U/aXZ0LjQQ4QHPiBJPEAT2IWbuu2++ygeNFBebbcHZtpyu1Rjbh4a /8cRGIGzSZqkfVxtdFEADTSIrEtUkcVP35GfBHAR0t1Ckma7zDhI3gppkPiMky9AjjHm RoYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=Y4dpkOAzGLs1cirXyG4hkQ762NsD2ifeUKAjEX1Y+CI=; fh=9sqEKGXuwAA9c0V9ZXRADQA4HhJpzxYAPqBLFba1wk4=; b=hgi+2uoZKSjogg4SsC658nqcfYz4h0biLD6RGT+eigcGNDT00zJmOxn0FemNgXmKqU wPMZvcv/W2RjqHDIUMshTn5NwSa6Dp+itxHg3NaM78ygutUASMTNWDR2XK///RKz1E2R iUEr774kyWpz8mpgpvE9MBd8USWpbsfovXv21DweQMTk4Ujol+BSYwHdjJ7JCt4mEL7r HoQggt1SmtCutu+G4rPKVkjJKR74Lnq6hwDcLKkrGwIwEERTyjzeKiyxABP1o1AjB+FN XDs7GYxi3HZG/anQJG+/pFjp6wB6n96a14nVO/khNQI28bc1CltsD0wp3adz0VNdFQl6 Q6FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=R0WpHc8X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id u11-20020a6540cb000000b00565aa20a07asi11569821pgp.683.2023.10.10.05.34.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 05:34:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=R0WpHc8X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E5C2F802547B; Tue, 10 Oct 2023 05:34:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231948AbjJJMeU (ORCPT <rfc822;rua109.linux@gmail.com> + 20 others); Tue, 10 Oct 2023 08:34:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231905AbjJJMeR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 10 Oct 2023 08:34:17 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 907ECF0; Tue, 10 Oct 2023 05:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1696941245; bh=kXS7WhluAd4PiUUxRUCXnsXLrFdoS1vueCxpn04VTXE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=R0WpHc8XQvn1Lji8rx5D6JKLLm6M9P6qaJYMFzgOu2iTe1Qg8jh7jI8TK+CjuABax ojMk4Heqk1IAnnbBYg7nOSp8qbKSO3FVazcdarSvueJfHW8l+e6AGYosXVvN7VoG4A Rhvxgg7pawEKVX3K8e6iEg8+3tUFU8o9y/qpW6LU= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> Date: Tue, 10 Oct 2023 14:33:57 +0200 Subject: [PATCH 2/5] selftests/nolibc: use EFI -bios for LoongArch qemu MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231010-nolibc-out-of-tree-v1-2-b6a263859596@weissschuh.net> References: <20231010-nolibc-out-of-tree-v1-0-b6a263859596@weissschuh.net> In-Reply-To: <20231010-nolibc-out-of-tree-v1-0-b6a263859596@weissschuh.net> To: Willy Tarreau <w@1wt.eu>, Shuah Khan <shuah@kernel.org> Cc: Zhangjin Wu <falcon@tinylab.org>, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1696941244; l=1717; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=kXS7WhluAd4PiUUxRUCXnsXLrFdoS1vueCxpn04VTXE=; b=mRJ10rNacYK1RUuAziauqWSviXnEL+7fllM4ClTgv0Qep9/tmh+FYPxesyXQHxDXpKS8EIs7m uxCVv7/ALa2BuA2ZMIFijBikPeE+RdpiMB6+7/7LSYovSINaHjBTpSn X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 10 Oct 2023 05:34:44 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779371910197665773 X-GMAIL-MSGID: 1779371910197665773 |
Series |
selftests/nolibc: various build improvements
|
|
Commit Message
Thomas Weißschuh
Oct. 10, 2023, 12:33 p.m. UTC
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>
---
Note: I'm wondering how this worked for anybody else.
---
tools/testing/selftests/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Thomas, On Tue, Oct 10, 2023 at 02:33:57PM +0200, Thomas Weißschuh wrote: > 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. Agreed. Let's hope at least users will be able to figure what's missing depending on the message. There's one thing, though, you hard-coded the path to the file system, and it's unlikely to be located at the same place for everyone: -bios /usr/share/edk2/loongarch64/OVMF_CODE.fd Sure, it's also possible to force QEMU_ARGS but it's becoming complicated due to the numerous arguments. Maybe use a QEMU_BIOS_loongarch variable for this ? This way if this starts to generalize to other archs, we can later simplify it and automatically append -bios when needed. > Link: https://lore.kernel.org/loongarch/1738d60a-df3a-4102-b1da-d16a29b6e06a@t-8ch.de/ > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > > --- > Note: I'm wondering how this worked for anybody else. Not much surprised. As I mentioned, my qemu currently doesn't support loongarch so I didn't boot that one. Maybe Zhangjin had this one as part of his other patches. Overall, on the principle, Acked-by: Willy Tarreau <w@1wt.eu> Thanks! Willy
Oct 22, 2023 11:21:16 Willy Tarreau <w@1wt.eu>: > On Tue, Oct 10, 2023 at 02:33:57PM +0200, Thomas Weißschuh wrote: >> 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. > > Agreed. Let's hope at least users will be able to figure what's > missing depending on the message. There's one thing, though, you > hard-coded the path to the file system, and it's unlikely to be > located at the same place for everyone: > > -bios /usr/share/edk2/loongarch64/OVMF_CODE.fd > > Sure, it's also possible to force QEMU_ARGS but it's becoming complicated > due to the numerous arguments. Maybe use a QEMU_BIOS_loongarch variable > for this ? This way if this starts to generalize to other archs, we can > later simplify it and automatically append -bios when needed. My hope was for it to be a purely temporary bandaid. But you are right, let's do it properly from the beginning. >> Link: https://lore.kernel.org/loongarch/1738d60a-df3a-4102-b1da-d16a29b6e06a@t-8ch.de/ >> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> >> >> --- >> Note: I'm wondering how this worked for anybody else. > > Not much surprised. As I mentioned, my qemu currently doesn't support > loongarch so I didn't boot that one. Maybe Zhangjin had this one as > part of his other patches. > > Overall, on the principle, Acked-by: Willy Tarreau <w@1wt.eu> Thanks!
On Tue, Oct 24, 2023 at 06:06:11PM +0200, Thomas Weißschuh wrote: > Oct 22, 2023 11:21:16 Willy Tarreau <w@1wt.eu>: > > > On Tue, Oct 10, 2023 at 02:33:57PM +0200, Thomas Weißschuh wrote: > >> 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. > > > > Agreed. Let's hope at least users will be able to figure what's > > missing depending on the message. There's one thing, though, you > > hard-coded the path to the file system, and it's unlikely to be > > located at the same place for everyone: > > > > -bios /usr/share/edk2/loongarch64/OVMF_CODE.fd > > > > Sure, it's also possible to force QEMU_ARGS but it's becoming complicated > > due to the numerous arguments. Maybe use a QEMU_BIOS_loongarch variable > > for this ? This way if this starts to generalize to other archs, we can > > later simplify it and automatically append -bios when needed. > > My hope was for it to be a purely temporary bandaid. > But you are right, let's do it properly from the beginning. The right way to think about temporary code is that if it's supposed to be quick to address, you don't want to introduce a temporary way of proceeding that will change later as the change will annoy some users. And if the reason for the temporary step is a temporary difficulty, you can be certain nobody will ever try to address it and that temporary will be definitive. So thinking "temporary" should generally ring a bell "am I going to annoy users for no reason or am I putting myself in a wrong corner". That's why I really try to avoid anything "temporary". (But there's no problem with making the wrong choice and regretting later, of course ;-)). Cheers, Willy
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index af60e07d3c12..258293639572 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -100,7 +100,7 @@ QEMU_ARGS_ppc64 = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC QEMU_ARGS_ppc64le = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_riscv = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_s390 = -M s390-ccw-virtio -m 1G -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" -QEMU_ARGS_loongarch = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" +QEMU_ARGS_loongarch = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" -bios /usr/share/edk2/loongarch64/OVMF_CODE.fd QEMU_ARGS = $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_EXTRA) # OUTPUT is only set when run from the main makefile, otherwise