Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2286866rwl; Sat, 1 Apr 2023 05:25:13 -0700 (PDT) X-Google-Smtp-Source: AKy350bWp+v9/RcIvq0PC+qmYyVYYWdpF+1r09Z/5EygyAGQZ8vFQeJN3ThPmvl5R5GxqCmTZ2qT X-Received: by 2002:a05:6402:8d9:b0:4fe:19cb:4788 with SMTP id d25-20020a05640208d900b004fe19cb4788mr28230709edz.42.1680351913350; Sat, 01 Apr 2023 05:25:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680351913; cv=none; d=google.com; s=arc-20160816; b=tGtorPbY7GwO4TXjhvjBhcIdGKpdwCSlY9kUMJ5rKQOh7JSS5qtQ3ONz0eStQ2Vxri Vpi85hcYyFI84EFTjkwfuSNNwyE8XZw6BR9prN34vMmOUS3D8bnvpEDcj1GUdbIZtrOJ tHLt09zZhtgxoFINNyoKHP+pPXgOfib/x8LEDF3swxdc+lt7xvuYXSuiXPPCWxHR6KK5 +bnRmfRIowb82RH2qharE0cBctyfnu5ccUrCu/oT/aLo75iVCVa8aXj9aEUPraEkSnGQ nugWq8OeiG0zYysVfl2XB0ks2q7k8DuPA1pOluxUQEUxfCV7CURDEbLeujtHEmNj4Fv3 D1Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=gYHitFm2Mbyvj4ofHCyY9rPjXQpQjNJMVMmltnoJxhw=; b=zyfYVtU5Am58rfXzW38tU8WSyCJjQuHobnkT9gUHf3xCyEPnp8Lgr1g1IUH0Klfqpg qrt30nUmWXbQlMj1stSpeXU9Z6swjZuSfF2AbtjabBtrxq+axOlckHVBo1uvkG0hYGXC 8dln9vrWyBYGbyKfmSMXwhPR52cpJBqObyJYecu6mMPOSoh5PzZkHfFMh7RUgplF9L2y 81sRTwW24vGgXeJxcjky0Aur4cU6jJMQxEEjSgX97Qb7bMFYtCCKBt9QjHsxDz+P+FhX CAKfGhg1QOtXT+zq/50CVYIG5yGW0hnHGZaw3OF3ZOKVGBFcFoahjxQHpun2HuOVhEBT +iSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m5-20020aa7c2c5000000b004fc19199fd6si3969786edp.143.2023.04.01.05.24.48; Sat, 01 Apr 2023 05:25:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbjDAMLC convert rfc822-to-8bit (ORCPT + 99 others); Sat, 1 Apr 2023 08:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjDAMLB (ORCPT ); Sat, 1 Apr 2023 08:11:01 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 243461D937; Sat, 1 Apr 2023 05:10:58 -0700 (PDT) Received: from ip4d1634d3.dynamic.kabel-deutschland.de ([77.22.52.211] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pia3u-0002IB-NC; Sat, 01 Apr 2023 14:10:26 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Guo Ren Cc: Conor Dooley , arnd@arndb.de, palmer@rivosinc.com, tglx@linutronix.de, peterz@infradead.org, luto@kernel.org, conor.dooley@microchip.com, jszhang@kernel.org, lazyparser@gmail.com, falcon@tinylab.org, chenhuacai@kernel.org, apatel@ventanamicro.com, atishp@atishpatra.org, mark.rutland@arm.com, ben@decadent.org.uk, bjorn@kernel.org, palmer@dabbelt.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren , =?ISO-8859-1?Q?Bj=F6rn_T=F6pel?= , Yipeng Zou Subject: Re: [PATCH -next V17 4/7] riscv: entry: Convert to generic entry Date: Sat, 01 Apr 2023 14:10:25 +0200 Message-ID: <2587778.7s5MMGUR32@diego> In-Reply-To: References: <20230222033021.983168-1-guoren@kernel.org> <23668656.ouqheUzb2q@diego> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_PASS,T_SPF_HELO_TEMPERROR autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guo, Am Samstag, 1. April 2023, 04:15:32 CEST schrieb Guo Ren: > On Fri, Mar 31, 2023 at 2:47 PM Heiko Stübner wrote: > > Am Freitag, 31. März 2023, 20:41:35 CEST schrieb Conor Dooley: > > > On Fri, Mar 31, 2023 at 07:34:38PM +0100, Conor Dooley wrote: > > > > On Tue, Feb 21, 2023 at 10:30:18PM -0500, guoren@kernel.org wrote: > > > > > From: Guo Ren > > > > > > > > > > This patch converts riscv to use the generic entry infrastructure from > > > > > kernel/entry/*. The generic entry makes maintainers' work easier and > > > > > codes more elegant. Here are the changes: > > > > > > > > > > - More clear entry.S with handle_exception and ret_from_exception > > > > > - Get rid of complex custom signal implementation > > > > > - Move syscall procedure from assembly to C, which is much more > > > > > readable. > > > > > - Connect ret_from_fork & ret_from_kernel_thread to generic entry. > > > > > - Wrap with irqentry_enter/exit and syscall_enter/exit_from_user_mode > > > > > - Use the standard preemption code instead of custom > > > > > > > > This has unfortunately broken booting my usual NFS rootfs on both my D1 > > > > and Icicle. It's one of the Fedora images from David, I think this one: > > > > http://fedora.riscv.rocks/kojifiles/work/tasks/3933/1313933/ > > > > > > > > It gets pretty far into things, it's once systemd is operational that > > > > things go pear shaped: > > > > > > Shoulda said, can share the full logs if required of course, but they're > > > quite verbose cos systemd etc. > > > > I was just investigating the same thing just now. So that saves me some > > tracking down the culprit :-) . > > > > My main qemu is living as a "board" in my boardfarm (also doing nfsroot) > > as well as my d1 nezha with nfsroot was affected. > Can you reproduce it with qemu? Could give me some tips and let me > reproduce it on qemu? As written the issue both happens on qemu-virt and also the d1-nezha board. Below I've summarized my setup a bit: (1) Qemu-commandline: --------------------- /usr/local/bin/qemu-system-riscv64 -M virt -smp 2 -m 1G -display none \ -cpu rv64,zbb=true,zbc=true,svpbmt=true,Zicbom=true,Zawrs=true,sscofpmf=true,v=true \ -serial telnet:localhost:5500,server,nowait -kernel /home/devel/nfs/kernel/riscv64/Image \ -append "earlycon=sbi root=/dev/nfs nfsroot=10.0.2.2:/home/devel/nfs/rootfs-riscv64virt ip=dhcp rw" \ -netdev user,id=n1 -device virtio-net-pci,netdev=n1 Which does the start using a nfs-root coming from an nfs-server running on the same host as qemu. Though the issue does not seem to be related to the nfs. I also tried starting with a local disk image like [0] and the issue with the journald still persists. (2) the rootfs-contents: ------------------------ Conor seems to be using Fedora, while my distribution of choice is Debian. My rootfs was created following the instructions on the Debian wiki for the debports with debootstrap [1]. This morning I also re-created a completely new and pristine rootfs using those instructions and the issue appeared immediately on first-boot. Hope this helps a bit Heiko [0] same result with a disk-image ... journald failing /usr/local/bin/qemu-system-riscv64 -M virt -smp 2 -m 1G -display none \ -cpu rv64,zbb=true,zbc=true,svpbmt=true,Zicbom=true,Zawrs=true,sscofpmf=true,v=true \ -serial telnet:localhost:5500,server,nowait -kernel /home/devel/nfs/kernel/riscv64/Image \ -append 'root=/dev/vda console=ttyS0' \ -drive file=/home/devel/nfs/rootfs-riscv64virt.ext4,format=raw,id=hd0 \ -device virtio-blk-pci,drive=hd0 [1] https://wiki.debian.org/RISC-V#debootstrap