From owner-freebsd-riscv@freebsd.org Mon Sep 30 22:08:43 2019 Return-Path: Delivered-To: freebsd-riscv@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D49A51337C3 for ; Mon, 30 Sep 2019 22:08:43 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46hxPR5D7Bz4VhT; Mon, 30 Sep 2019 22:08:43 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 7F2762A086; Mon, 30 Sep 2019 22:08:43 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-ot1-f49.google.com with SMTP id g103so2462527otg.0; Mon, 30 Sep 2019 15:08:43 -0700 (PDT) X-Gm-Message-State: APjAAAU8nOF0lfwhcchl6UszYJnRJ/yNcAT2m85RlzJjzx3xTmibEMjL seilpxpUiyZEMy6Etzd9xYGmF1EyDHiS+skqCKU= X-Google-Smtp-Source: APXvYqwOK0O5H3pE/zJr9jSKK4pp+wSHmOegTssenE6SCI7BtflnHLQU8r9+1em4nhl5aJbzu327rQBajyUOYlZ9ZLM= X-Received: by 2002:a9d:518b:: with SMTP id y11mr14859246otg.344.1569881322635; Mon, 30 Sep 2019 15:08:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Mitchell Horne Date: Mon, 30 Sep 2019 18:08:21 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: QEMU 4.1 and RISC-V To: Muhammad Moinur Rahman Cc: Li-Wen Hsu , freebsd-riscv Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-riscv@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD on the RISC-V instruction set architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2019 22:08:43 -0000 On Mon, Sep 30, 2019 at 6:58 AM Muhammad Moinur Rahman wrote: > > Hi Li-Wen, > Should we add this to pkg-message for 4.1.X? > Kind Regards, > @bofh I don't think it's necessary. There are only a small number of FreeBSD/RISC-V users, and it is likely that they will avoid this issue altogether if they are following our wiki page. Mitchell > > > On 30 Sep, 2019, at 08:54, Li-Wen Hsu wrote: > > > > On Mon, Sep 30, 2019 at 4:28 AM Li-Wen Hsu wrote: > >> > >> On Mon, Sep 30, 2019 at 4:12 AM Mitchell Horne wrote: > >>> > >>> On Sun, Sep 29, 2019 at 4:56 PM Li-Wen Hsu wrote: > >>>> > >>>> On Sun, Sep 29, 2019 at 10:48 PM Mitchell Horne wrote: > >>>>> > >>>>> > >>>>> On Sun, Sep 29, 2019, 15:17 Li-Wen Hsu wrote: > >>>>>> > >>>>>> I found that RISC-V test started failing recently: > >>>>>> https://ci.freebsd.org/job/FreeBSD-head-riscv64-test/ > >>>>>> > >>>>>> After some checking, I found the issue is our bbl image cannot boot > >>>>>> with this command: > >>>>>> > >>>>>> qemu-system-riscv64 -nographic -m 2048M -kernel ./bbl > >>>>>> > >>>>>> in QEMU 4.1, while 3.1 and 4.0 are fine. I've switched the QEMU > >>>>>> version used in that job to 4.0, but I think it would be best if we > >>>>>> can find the root cause is in FreeBSD or QEMU. > >>>>>> > >>>>>> Can anyone also help on this? > >>>>> > >>>>> > >>>>> Hi Li-Wen, > >>>>> > >>>>> I can take a look in the coming week if you're okay with the workaround for the time being. Locally > >>>>> I've had no issue running bbl with qemu 4.1 but perhaps there's something more specific that the > >>>>> CI script is doing. > >>>>> > >>>>> I'm hoping we will soon be able to replace bbl with the more actively maintained OpenSBI firmware. > >>>>> I have some pending changes that will allow us to boot FreeBSD with it, and after that I'd like to > >>>>> create ports for both bootloaders, which I hope will make the CI setup a little simpler and less fragile > >>>>> than building bbl currently is. > >>>> > >>>> Thanks very much, Mitchell, > >>>> > >>>> Let's narrow down the scope, are you using the qemu-devel pkg from > >>>> official repository or building by yourself? > >>>> > >>> > >>> This was using qemu that I had built myself, but the executable from qemu-devel > >>> works for me as well. > >>> > >>>> And can you try this bbl image? > >>>> https://artifact.ci.freebsd.org/snapshot/head/r352870/riscv/riscv64/bbl.xz > >>> > >>> I had no issue booting this image with my self-built qemu or the one from > >>> pkg. The only observable difference from qemu 3.1 is that a warning is > >>> printed to stderr, but considering the CI script is timing out I don't think > >>> that is the issue. > >> > >> What's your command line to launch qemu? The CI (and I) uses this: > >> > >> qemu-system-riscv64 -nographic -m 2048M -kernel ./bbl > >> > >> I also tried to build qemu locally, and result is the same. I also did > >> a git bisect: > >> > >> 0ac24d56c5e7d32423ea78ac58a06b444d1df04d is the first bad commit > > > > Hmm, after checking with wiki.freebsd.org/riscv, I found that we need > > to specify `-machine virt` now. > > > > QEMU 4.1 default machine for riscv64 is "spike" not "spike_v1.10" > > anymore, and need other more arguments. >