From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.17875.1675955715085611036 for ; Thu, 09 Feb 2023 07:15:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tKOrCn9g; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4AA6F61AF3 for ; Thu, 9 Feb 2023 15:15:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D35FC4339B for ; Thu, 9 Feb 2023 15:15:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675955714; bh=TtgYQ5gzY/gE/w9sufEVtNxF4doQlKQaY/CGlZFYADI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tKOrCn9gaseEgluwwnOLxJOxjgNxg4aV0cRdtjKidl9JKxIMmqiXmHCRka0F5jmEL mhLxefbguhONyASvA8OJK9aRw9PxoPcyNg0HdcYAUxzllctkdzyj8bg7J8EdSz27zZ jvAfOLx4CNXwVCP2RCMRhrllJkcKcw7gc93SGU3wIwot/9h2aVS62cmt9+qTy1fPDi egiV5Dw3w+228zDxCUn7edq9s5URiaDQVMNZfJ5K+pYk1MgvLs0ABVaGWxVisa8wju FyH2Vd3SG7VwR0AknthPrBceMA1y/CJtOjQiyYbPuDgOphw4l6UTO1f45ej3pMb/C4 rW/oTGYz2VKGA== Received: by mail-lf1-f53.google.com with SMTP id v17so3571794lfd.7 for ; Thu, 09 Feb 2023 07:15:14 -0800 (PST) X-Gm-Message-State: AO0yUKXVD7eA1Tl0NzoceaeOngXzlOyGiF1IpeKYC2YwFzLDExTfTlq9 jcOxuv4Kzn++aL77qiElcXly/q9gEvXIQuY11Xg= X-Google-Smtp-Source: AK7set/pdRtdKHBQm9NLYBRM7Etkvz/5/Q2esfnGR+CVzfEh76zRnSEYUUhb3X8QV0p6g9TxZxiG9Wde+ExrSu88XUo= X-Received: by 2002:ac2:55ba:0:b0:4ca:f9e3:c324 with SMTP id y26-20020ac255ba000000b004caf9e3c324mr1786377lfg.190.1675955712100; Thu, 09 Feb 2023 07:15:12 -0800 (PST) MIME-Version: 1.0 References: <20230119120021.4yohqindvj3ghwky@sirius.home.kraxel.org> <173FFD60429C89C3.3213@groups.io> In-Reply-To: From: "Ard Biesheuvel" Date: Thu, 9 Feb 2023 16:15:00 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX To: Oliver Steffen Cc: devel@edk2.groups.io, Gerd Hoffmann , Marc Zyngier , dann.frazier@canonical.com Content-Type: text/plain; charset="UTF-8" On Tue, 7 Feb 2023 at 13:58, Oliver Steffen wrote: > > On Tue, Feb 7, 2023 at 12:57 PM Ard Biesheuvel wrote: >> >> On Tue, 7 Feb 2023 at 11:51, Oliver Steffen wrote: >> > >> > On Thu, Feb 2, 2023 at 12:09 PM Oliver Steffen wrote: >> >> >> >> >> >> On Wed, Feb 1, 2023 at 2:29 PM Ard Biesheuvel wrote: >> >>> >> >>> On Wed, 1 Feb 2023 at 13:59, Oliver Steffen wrote: >> >>> > >> >>> > On Wed, Feb 1, 2023 at 12:52 PM Ard Biesheuvel wrote: >> >>> >> >> >>> >> On Wed, 1 Feb 2023 at 10:14, Oliver Steffen wrote: >> >>> >> > >> >> >> >> [...] >> >>> >> >>> >> > I am sorry, this story does not seem to be over yet. >> >>> >> > >> >>> >> > We are using the Erratum patch and also included the commit 406504c7 in >> >>> >> > the kernel. >> >>> >> > Now the firmware crashes sometimes (10 out of 89 tests). >> >>> >> > >> >>> >> >> >>> >> Thanks for the report. Is this still on ThunderX2? >> >>> >> >> >>> >> > Any hints are very welcome! >> >>> >> > >> >>> >> >> >>> >> Do you have access to those build artifacts? >> >>> > >> >>> > >> >>> > https://kojihub.stream.centos.org/kojifiles/work/tasks/5251/1835251/edk2-aarch64-20221207gitfff6d81270b5-4.el9.test.noarch.rpm >> >>> > >> >>> > and/or here: >> >>> > >> >>> > https://kojihub.stream.centos.org/koji/taskinfo?taskID=1835251 >> >>> > >> >>> > Source for reference: >> >>> > https://gitlab.com/redhat/centos-stream/src/edk2/-/merge_requests/24 >> >>> > >> >>> >> >>> Any chance the .dll files (which are actually ELF executables) have >> >>> been preserved somewhere? >> >> >> >> Here is the build folder (~90MB): >> >> https://gitlab.com/osteffen/thunderx2-debug/-/raw/main/armvirt-thunderx2-issue.tar.xz >> >> >> >> I am waiting for the tests with the additional debug output to run. >> > >> > >> > We reran the test suite with the Erratum and the additional debug >> > output enabled. Strangely, the problem does not occur anymore, the >> > firmware boots up normally. >> > >> > We retried the tests without the additional debug output. >> > RHEL ships two firmware flavors for AARCH64: a silent and a verbose >> > version. >> >> Are these RELEASE vs DEBUG builds? > > > All builds are DEBUG, just the amount of information printed on > the serial is different (almost zero for the "silent" one.) > >> >> > Both were tried. We see no problems with the verbose >> > one. The silent one fails noticeably more often if a software TPM device >> > is present. >> > >> >> This smells like some missing cache or TLB maintenance - the verbose >> one exits to the host much more often, and likely relies on cache/TLB >> maintenance occurring in the hypervisor. >> >> So the build always includes TPM support but the issue only occurs >> when the sw TPM is actually exposed by QEMU? > > > Yes. > All builds include support for TPM, but the issue occurs more frequently > if a sw TPM is exposed by QEMU. > Any chance you could provide a specific command line for launching QEMU? I am trying to reproduce this, but I am not making any progress. >> >> > Could this be related to how much stuff is going on in the early phase >> > of the firmware (when logging is enabled: formatting of messages and >> > sending to serial port...) ? >> > >> >> I'll try to see if I can rig something up that logs into a buffer >> rather than straight to the serial, and dump it all out when handling >> the crash >> This takes a bit more time than I can afford to spend on this atm, and I'd like to be able to reproduce before I go down this rabbit hole.