Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp505089rdb; Tue, 31 Oct 2023 13:37:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHc49M0MyKL6hHo23NGvm5eY6luWtCDMhNzTiZcpK0jP9vOWi6/KhkjA/9m9rZPzFZ6aDGx X-Received: by 2002:a05:6a00:16c3:b0:6be:7ee:9914 with SMTP id l3-20020a056a0016c300b006be07ee9914mr12046450pfc.11.1698784636936; Tue, 31 Oct 2023 13:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698784636; cv=none; d=google.com; s=arc-20160816; b=qU9UxtG3s1V2zlvtSFDMUph1oxMsBZQWK59ryMIrqMoLeR8tpElgWCWsEAQYJ99U3I yPD0qofhBt00UffsVoa/8QM2Jsam4QIT4QITZ3uI+gGJ556Rqi5zu7s8i6L3vRr+DoMj 3gocQLK04hZUWYcBNmbzfX13sMsFrgaD8q238g355tUlNgol2+631yvVBDLLIF9qlm64 DkpJRoFpoaz5sE2obT/2lKv/LFFeQmgyPL9sPLduydkgutf6qw7sfUmBHWo4md9Xx4uy 9uU2LG5+OcT/j++1ZY7mqxABLFIdos8Z2pZNH8oXAQj8Nv7ILS/iZihN/5NmkPD6kpal lm2A== 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=uvLFXYTo16uhh10O+VO5oxJ7HqjjE0Qi83SJRFWwDOM=; fh=MEusuZMnxhrNAu45ysRmC1MHGnmniUkTNzVzpsulgt4=; b=UxqYTIjEsYjgJAuUDbHvZD07s3FNxFaoq4zxCF3S0IZ5vKsHCxQ450uV/T3wtpxq0U +TOH4Jq6yajU9Mz/zHx2JTUOh94rgfFZ7JCn1E7QZ8DWGYDHFu3V+0GmpUCGUj+11krl GP7XOiBdF9jGHybq2k2TAWdLtf9vCKn+O/TYFE/Qei1y6Z8ybhWNnFyy78L/ixyJ3kwD DuxEPn9ECcDjFu09sZyGwgt4SxolJeNLl59EouqYwmb1pkoI990C+LVUQFmvq9h+gVaD 4Pr6n/m2gMptkmX2Xv1tauvdM3enF+7aJJ/1gz0nbmivOmHqY3KQzdhYHoCJuPkzu2E9 D/6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=n4hF25HX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p21-20020a056a000a1500b006be04b8c3basi132560pfh.178.2023.10.31.13.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 13:37:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=n4hF25HX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 235CF802F216; Tue, 31 Oct 2023 13:37:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233491AbjJaUhH (ORCPT + 99 others); Tue, 31 Oct 2023 16:37:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbjJaUhG (ORCPT ); Tue, 31 Oct 2023 16:37:06 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C3F5F3; Tue, 31 Oct 2023 13:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1698784621; bh=W5TEpxfyI98GvsWGNdqegtj19Ji2ow6WvLtnijFpbxE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=n4hF25HXVWKd8mEbbgUYBm4ihR20qlzNQ+HSpVwYZ0Dyxux6K46kz0O/wE0STdQLi kAgIxiPHPb57Uq33RKDKEUlRTkQ2DcDl2RmFBBPFsx62v4zsFiNhcI8rhsH8ehzaCY QYpz+LR2raYl0jVsEE8m4/9Z6psF44ZSRRsOtdm8= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 31 Oct 2023 21:36:58 +0100 Subject: [PATCH 1/3] 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: <20231031-nolibc-out-of-tree-v1-1-47c92f73590a@weissschuh.net> References: <20231031-nolibc-out-of-tree-v1-0-47c92f73590a@weissschuh.net> In-Reply-To: <20231031-nolibc-out-of-tree-v1-0-47c92f73590a@weissschuh.net> To: Willy Tarreau , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Shuah Khan Cc: Zhangjin Wu , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1698784620; l=2150; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=W5TEpxfyI98GvsWGNdqegtj19Ji2ow6WvLtnijFpbxE=; b=xfctWRM9ByPw1ywv0Ip8sy2zDAjHMebbxY8PmyqXN0WXGJfH8FEL+EaPzaUfkLdhn+v4leaZJ gn5w5DGsQANAJ1fxefufQIpB4RQnW7gkA8yv1qsGCJhQiF5j71lHhT2 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 31 Oct 2023 13:37:13 -0700 (PDT) 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 --- tools/testing/selftests/nolibc/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index a0fc07253baf..eb258ae1d948 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -88,6 +88,13 @@ QEMU_ARCH_s390 = s390x QEMU_ARCH_loongarch = loongarch64 QEMU_ARCH = $(QEMU_ARCH_$(XARCH)) +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 + # QEMU_ARGS : some arch-specific args to pass to qemu QEMU_ARGS_i386 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_x86_64 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)" @@ -101,7 +108,7 @@ QEMU_ARGS_ppc64le = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC 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 = $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_EXTRA) +QEMU_ARGS = $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_BIOS) $(QEMU_ARGS_EXTRA) # OUTPUT is only set when run from the main makefile, otherwise # it defaults to this nolibc directory. -- 2.42.0