Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-05-20 Thread Ard Biesheuvel
On Sat, 20 May 2023 at 10:37, Oliver Steffen wrote: > > Quoting Ard Biesheuvel (2023-05-19 23:36:53) > > On Fri, 19 May 2023 at 18:32, Oliver Steffen wrote: > > > > > > > > > Hi all, > > > > > > I had another look at this and I can now reproduce the issue consistently, > > > with a quite minimal

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-05-20 Thread Oliver Steffen
Quoting Ard Biesheuvel (2023-05-19 23:36:53) > On Fri, 19 May 2023 at 18:32, Oliver Steffen wrote: > > > > > > Hi all, > > > > I had another look at this and I can now reproduce the issue consistently, > > with a quite minimal setup, on recent Linux kernel, Qemu, and EDK2. > > It requires

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-05-19 Thread Ard Biesheuvel
On Fri, 19 May 2023 at 18:32, Oliver Steffen wrote: > > > Hi all, > > I had another look at this and I can now reproduce the issue consistently, > with a quite minimal setup, on recent Linux kernel, Qemu, and EDK2. > It requires rebooting the guest in a tight loop. It happens in silent > and

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-05-19 Thread Oliver Steffen
Quoting Oliver Steffen (2023-03-02 14:29:43) > On Thu, Mar 2, 2023 at 11:50 AM Ard Biesheuvel <[1]a...@kernel.org> wrote: > > On Thu, 9 Feb 2023 at 16:15, Ard Biesheuvel <[2]a...@kernel.org> wrote: > > > > On Tue, 7 Feb 2023 at 13:58, Oliver Steffen <[3]ostef...@redhat.com> >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-03-02 Thread Oliver Steffen
On Thu, Mar 2, 2023 at 11:50 AM Ard Biesheuvel wrote: > On Thu, 9 Feb 2023 at 16:15, Ard Biesheuvel wrote: > > > > 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

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-03-02 Thread Ard Biesheuvel
On Thu, 9 Feb 2023 at 16:15, Ard Biesheuvel wrote: > > 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 >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-02-09 Thread Ard Biesheuvel
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

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-02-07 Thread Oliver Steffen
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

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-02-07 Thread Ard Biesheuvel
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

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-02-07 Thread Oliver Steffen
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 >>

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-02-02 Thread Oliver Steffen
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

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-02-01 Thread Ard Biesheuvel
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: >> > >> > Hi everyone! >> > >> > On Thu, Jan 19, 2023 at 2:21 PM Ard Biesheuvel wrote: >> > > >> > > On Thu, 19 Jan 2023 at

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-02-01 Thread Oliver Steffen
On Wed, Feb 1, 2023 at 12:52 PM Ard Biesheuvel wrote: > On Wed, 1 Feb 2023 at 10:14, Oliver Steffen wrote: > > > > Hi everyone! > > > > On Thu, Jan 19, 2023 at 2:21 PM Ard Biesheuvel wrote: > > > > > > On Thu, 19 Jan 2023 at 13:55, Oliver Steffen > wrote: > > > > > > > > Quoting Gerd Hoffmann

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-02-01 Thread Ard Biesheuvel
On Wed, 1 Feb 2023 at 10:14, Oliver Steffen wrote: > > Hi everyone! > > On Thu, Jan 19, 2023 at 2:21 PM Ard Biesheuvel wrote: > > > > On Thu, 19 Jan 2023 at 13:55, Oliver Steffen wrote: > > > > > > Quoting Gerd Hoffmann (2023-01-19 13:00:21) > > > > Hi, > > > > > > > > > > I tried the most

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-02-01 Thread Oliver Steffen
Hi everyone! On Thu, Jan 19, 2023 at 2:21 PM Ard Biesheuvel wrote: > > On Thu, 19 Jan 2023 at 13:55, Oliver Steffen wrote: > > > > Quoting Gerd Hoffmann (2023-01-19 13:00:21) > > > Hi, > > > > > > > > I tried the most recent Qemu master (v7.2.50) and also v7.0.0, > > > > > on the 5.14 (RHEL)

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-26 Thread Marc Zyngier
On Thu, 26 Jan 2023 12:01:51 +, Gerd Hoffmann wrote: > > On Thu, Jan 19, 2023 at 02:21:30PM +0100, Ard Biesheuvel wrote: > > On Thu, 19 Jan 2023 at 13:55, Oliver Steffen wrote: > > > > > > Quoting Gerd Hoffmann (2023-01-19 13:00:21) > > > > Hi, > > > > > > > > > > I tried the most recent

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-26 Thread Marc Zyngier
On Thu, 26 Jan 2023 14:46:13 +, Gerd Hoffmann wrote: > > On Thu, Jan 26, 2023 at 01:48:12PM +, Marc Zyngier wrote: > > On Thu, 26 Jan 2023 12:01:51 +, > > Gerd Hoffmann wrote: > > > > > > > > Thanks for the koji link, Gerd. > > > > > > > > > > It works with 6.1.7-200.fc37.aarch64.

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-26 Thread Gerd Hoffmann
On Thu, Jan 26, 2023 at 01:48:12PM +, Marc Zyngier wrote: > On Thu, 26 Jan 2023 12:01:51 +, > Gerd Hoffmann wrote: > > > > > > Thanks for the koji link, Gerd. > > > > > > > > It works with 6.1.7-200.fc37.aarch64. > > > > Perfect. > > > > > > > > Thanks Ard, thanks Marc! > > > > > > > >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-26 Thread Gerd Hoffmann
On Thu, Jan 19, 2023 at 02:21:30PM +0100, Ard Biesheuvel wrote: > On Thu, 19 Jan 2023 at 13:55, Oliver Steffen wrote: > > > > Quoting Gerd Hoffmann (2023-01-19 13:00:21) > > > Hi, > > > > > > > > I tried the most recent Qemu master (v7.2.50) and also v7.0.0, > > > > > on the 5.14 (RHEL) kernel

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-23 Thread Marc Zyngier
On Thu, 19 Jan 2023 11:11:34 +, 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

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Ard Biesheuvel
On Thu, 19 Jan 2023 at 13:55, Oliver Steffen wrote: > > Quoting Gerd Hoffmann (2023-01-19 13:00:21) > > Hi, > > > > > > I tried the most recent Qemu master (v7.2.50) and also v7.0.0, > > > > on the 5.14 (RHEL) kernel and on 6.1.6-200.fc37.aarch64 (from Fedora). > > > > No luck. > > > > > > > >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Oliver Steffen
Quoting Gerd Hoffmann (2023-01-19 13:00:21) > Hi, > > > > I tried the most recent Qemu master (v7.2.50) and also v7.0.0, > > > on the 5.14 (RHEL) kernel and on 6.1.6-200.fc37.aarch64 (from Fedora). > > > No luck. > > > > > > > Does that include a backport of commit > >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Ard Biesheuvel
On Thu, 19 Jan 2023 at 12:56, Marc Zyngier wrote: > > On Thu, 19 Jan 2023 11:11:34 +, > 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

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Gerd Hoffmann
Hi, > > I tried the most recent Qemu master (v7.2.50) and also v7.0.0, > > on the 5.14 (RHEL) kernel and on 6.1.6-200.fc37.aarch64 (from Fedora). > > No luck. > > > > Does that include a backport of commit > 406504c7b0405d74d74c15a667cd4c4620c3e7a9? Probably not given that fedora kernels are

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Oliver Steffen
Quoting Ard Biesheuvel (2023-01-19 12:11:34) > (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 >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Ard Biesheuvel
(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

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-19 Thread Oliver Steffen
Quoting Ard Biesheuvel (2023-01-18 10:22:12) > On Wed, 18 Jan 2023 at 09:48, Ard Biesheuvel wrote: > > > > On Wed, 18 Jan 2023 at 09:28, Oliver Steffen wrote: > > > > > > Quoting Ard Biesheuvel (2023-01-18 08:34:32) > > > > On Wed, 18 Jan 2023 at 07:37, Oliver Steffen > > > > wrote: > > > > >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-18 Thread Ard Biesheuvel
On Wed, 18 Jan 2023 at 09:48, Ard Biesheuvel wrote: > > On Wed, 18 Jan 2023 at 09:28, Oliver Steffen wrote: > > > > Quoting Ard Biesheuvel (2023-01-18 08:34:32) > > > On Wed, 18 Jan 2023 at 07:37, Oliver Steffen wrote: > > > > > > > > On Tue, Jan 17, 2023 at 3:57 PM Ard Biesheuvel wrote: > > >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-18 Thread Ard Biesheuvel
On Wed, 18 Jan 2023 at 09:28, Oliver Steffen wrote: > > Quoting Ard Biesheuvel (2023-01-18 08:34:32) > > On Wed, 18 Jan 2023 at 07:37, Oliver Steffen wrote: > > > > > > On Tue, Jan 17, 2023 at 3:57 PM Ard Biesheuvel wrote: > > >> > > >> On Tue, 17 Jan 2023 at 13:48, Oliver Steffen wrote: > >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-18 Thread Oliver Steffen
Quoting Ard Biesheuvel (2023-01-18 08:34:32) > On Wed, 18 Jan 2023 at 07:37, Oliver Steffen wrote: > > > > On Tue, Jan 17, 2023 at 3:57 PM Ard Biesheuvel wrote: > >> > >> On Tue, 17 Jan 2023 at 13:48, Oliver Steffen wrote: > >> > > >> > Hi Ard, Hi everyone, > >> > > >> > Thanks for the work! >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-17 Thread Ard Biesheuvel
On Wed, 18 Jan 2023 at 07:37, Oliver Steffen wrote: > > On Tue, Jan 17, 2023 at 3:57 PM Ard Biesheuvel wrote: >> >> On Tue, 17 Jan 2023 at 13:48, Oliver Steffen wrote: >> > >> > Hi Ard, Hi everyone, >> > >> > Thanks for the work! >> > >> > But somehow this patch (as it was merged into master

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-17 Thread Oliver Steffen
On Tue, Jan 17, 2023 at 3:57 PM Ard Biesheuvel wrote: > On Tue, 17 Jan 2023 at 13:48, Oliver Steffen wrote: > > > > Hi Ard, Hi everyone, > > > > Thanks for the work! > > > > But somehow this patch (as it was merged into master branch) does not > > work for me on the ThunderX box we have. > > >

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-17 Thread Ard Biesheuvel
On Tue, 17 Jan 2023 at 13:48, Oliver Steffen wrote: > > Hi Ard, Hi everyone, > > Thanks for the work! > > But somehow this patch (as it was merged into master branch) does not > work for me on the ThunderX box we have. > > Any idea what could be wrong? I'm not sure I understand the question. The

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-17 Thread Oliver Steffen
Hi Ard, Hi everyone, Thanks for the work! But somehow this patch (as it was merged into master branch) does not work for me on the ThunderX box we have. Any idea what could be wrong? I enabled the erratum during build ;-) CPU Info: # lscpu Architecture: aarch64 CPU op-mode(s):

Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-09 Thread dann frazier
On Thu, Jan 05, 2023 at 05:25:28PM +0100, Ard Biesheuvel wrote: > The early ID map used by ArmVirtQemu uses ASID scoped non-global > mappings, as this allows us to switch to the permanent ID map seamlessly > without the need for explicit TLB maintenance. > > However, this triggers a known erratum

[edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX

2023-01-05 Thread Ard Biesheuvel
The early ID map used by ArmVirtQemu uses ASID scoped non-global mappings, as this allows us to switch to the permanent ID map seamlessly without the need for explicit TLB maintenance. However, this triggers a known erratum on ThunderX, which does not tolerate non-global mappings that are