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.web11.43969.1674130913763949331 for ; Thu, 19 Jan 2023 04:21:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UrCZH0k/; 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 0B34260ADC for ; Thu, 19 Jan 2023 12:21:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70354C433F0 for ; Thu, 19 Jan 2023 12:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674130912; bh=9oyMRITEuuXDb2DwDQ/CF5rs4O8z4MZdpp392qgiMxI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UrCZH0k/9H9030R6M9ILoTZigtcgO3VsI+LFs77k+pE2NMs2Y3DbzR9VhiWqZVxuI R7dlqGUJGcnqDOKZtdZHtYhgwkKRK2e4YExyJNM/ty6mJ9Mb+IXFRoczt7uQoLGMlM OgYF6G9ebGQiqtyc1+IfLTbsWSFabLQO3BhsXKHAekNaL9ABBWh/a5pbxmbQrbkr+V hnm61uM6pWLYjIFV0yFj7bZfh5VEufoNzs05+sR3IQOxQvMd3gHRihftBiFpNzIjpy m5x/N9Kw2jod+YA2ePtpIi/DTWid9WlCWCVCbfLr5b+dZ8Myrnp1zORfVKkaGyFnNd 13G79A6LyWF8w== Received: by mail-lf1-f52.google.com with SMTP id cf42so3008630lfb.1 for ; Thu, 19 Jan 2023 04:21:52 -0800 (PST) X-Gm-Message-State: AFqh2kr+VK2pIDqkf52feXSuhAV32Cj96yS2wYJV2HRmoH2QORzYpn+8 /cByzHlXrhRIfttr5OCIggF7ToSbBxxqn8wQvRE= X-Google-Smtp-Source: AMrXdXvsKbIDAUKPfESVeE36mpB8JJ2mitVu9gvfgvBU+s05fZDSHbcH4T1S/MeVcHiC3M99MhSncVCS0HIOXeKpqvg= X-Received: by 2002:a05:6512:3086:b0:4bc:bdf5:f163 with SMTP id z6-20020a056512308600b004bcbdf5f163mr598368lfd.583.1674130910456; Thu, 19 Jan 2023 04:21:50 -0800 (PST) MIME-Version: 1.0 References: <20230105162528.1430368-1-ardb@kernel.org> <20230105162528.1430368-2-ardb@kernel.org> <86y1pyn3g4.wl-maz@kernel.org> In-Reply-To: <86y1pyn3g4.wl-maz@kernel.org> From: "Ard Biesheuvel" Date: Thu, 19 Jan 2023 13:21:39 +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: Marc Zyngier Cc: Oliver Steffen , devel@edk2.groups.io, dann.frazier@canonical.com, kraxel@redhat.com Content-Type: text/plain; charset="UTF-8" On Thu, 19 Jan 2023 at 12:56, Marc Zyngier wrote: > > On Thu, 19 Jan 2023 11:11:34 +0000, > Ard Biesheuvel wrote: > > > > (cc Marc) > > > > Context: > > - on my TX2 (with the S1PTW r/o memslot fix applied), the new version > > of ArmVirtQemu that uses an initial ID map in emulated NOR flash works > > fine. > > - in Oliver's case (which is a slightly different flavor of TX2), it > > crashes extremely early, presumably at the point where this ID map is > > activated. > > Oliver seems to have a vintage ThunderX (aka the worst arm64 > implementation in history!), so it is indeed a very different beat > from TX2. > No, it's a TX2 alright - we disabled this ID map for TX1 already because it tickles the I-cache corruption erratum (EDK2 runs at EL1 and the initial ID map is ASID scoped with non-global mappings, so that we can switch to the actual ID map seamlessly) > Without the kernel patch[1], I can trigger the issue pretty reliably, > specially in the absence of THP. It all depends on the layout of the > EDK2 object and the order in which pages get mapped. > > The first course of action would be to make sure that the patch is > applied to the host kernel. If this still fails to boot, I'm happy to > help investigating it. > indeed.