From: "Ard Biesheuvel" <ardb@kernel.org>
To: Oliver Steffen <osteffen@redhat.com>
Cc: devel@edk2.groups.io, Gerd Hoffmann <kraxel@redhat.com>,
Marc Zyngier <maz@kernel.org>,
dann.frazier@canonical.com
Subject: Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX
Date: Sat, 20 May 2023 11:20:40 +0200 [thread overview]
Message-ID: <CAMj1kXHxhi06=h_L6+JkPrxyrXrf-2W4xotjYBPPZ+esWG8qLQ@mail.gmail.com> (raw)
In-Reply-To: <CA+bRGFo-oqOn2jdWkP9LTEGiY8KFbRGFwhxVJS6V4T0XqGF3RA@mail.gmail.com>
On Sat, 20 May 2023 at 10:37, Oliver Steffen <osteffen@redhat.com> wrote:
>
> Quoting Ard Biesheuvel (2023-05-19 23:36:53)
> > On Fri, 19 May 2023 at 18:32, Oliver Steffen <osteffen@redhat.com> 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 verbose
> > > builds alike, but since the verbose ones are slowed down by the serial
> > > output, it
> > > takes longer to hit the issue.
> > > It is possible to reproduce it with the silent builds within a few minutes.
> > > For the verbose case I recommend running multiple Qemu instances in parallel (as
> > > many as the machine allows, in my case ~100).
> > >
> >
> > Thanks a lot for all these details, this is extremely helpful.
> >
> > So what appears to be happening is that we split the 2M block mapping
> > that covers the code that we were called from, and hit a level 2
> > translation fault because the updated page table entry is still
> > observed to be in its transient 'invalid' state as we return to it.
> >
> > Could you please check whether this makes a difference?
> >
> > --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibReplaceEntry.S
> > +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibReplaceEntry.S
> > @@ -65,6 +65,7 @@
> > // write updated entry
> > str x1, [x0]
> > dsb nshst
> > + isb
> >
> > .L2_\@:
> > .endm
>
> That fixes it - no crash observed within 150k iterations.
> Thanks, Ard!
>
Fantastic! Thanks a lot for all the effort in tracking this down.
prev parent reply other threads:[~2023-05-20 9:20 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 16:25 [PATCH v2 1/2] ArmVirtPkg/ArmPlatformLibQemu: Ensure that VFP is on before running C code Ard Biesheuvel
2023-01-05 16:25 ` [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX Ard Biesheuvel
2023-01-10 0:08 ` dann frazier
2023-01-17 12:47 ` [edk2-devel] " Oliver Steffen
2023-01-17 14:53 ` Ard Biesheuvel
2023-01-18 6:36 ` Oliver Steffen
2023-01-18 7:34 ` Ard Biesheuvel
2023-01-18 8:27 ` Oliver Steffen
2023-01-18 8:48 ` Ard Biesheuvel
2023-01-18 9:22 ` Ard Biesheuvel
2023-01-19 11:03 ` Oliver Steffen
2023-01-19 11:11 ` Ard Biesheuvel
2023-01-19 11:25 ` Oliver Steffen
2023-01-19 11:55 ` Marc Zyngier
2023-01-19 12:21 ` Ard Biesheuvel
2023-01-19 12:00 ` Gerd Hoffmann
2023-01-19 12:55 ` Oliver Steffen
2023-01-19 13:21 ` Ard Biesheuvel
2023-01-26 12:01 ` Gerd Hoffmann
2023-01-26 13:48 ` Marc Zyngier
2023-01-26 14:46 ` Gerd Hoffmann
2023-01-26 15:08 ` Marc Zyngier
2023-02-01 9:13 ` Oliver Steffen
2023-02-01 11:51 ` Ard Biesheuvel
2023-02-01 12:58 ` Oliver Steffen
2023-02-01 13:29 ` Ard Biesheuvel
2023-02-02 11:09 ` Oliver Steffen
[not found] ` <173FFD60429C89C3.3213@groups.io>
2023-02-07 10:51 ` Oliver Steffen
2023-02-07 11:56 ` Ard Biesheuvel
2023-02-07 12:58 ` Oliver Steffen
2023-02-09 15:15 ` Ard Biesheuvel
2023-03-02 10:50 ` Ard Biesheuvel
2023-03-02 13:29 ` Oliver Steffen
[not found] ` <17489D498A098DB9.9697@groups.io>
2023-05-19 16:32 ` Oliver Steffen
2023-05-19 21:36 ` Ard Biesheuvel
2023-05-20 8:37 ` Oliver Steffen
2023-05-20 9:20 ` Ard Biesheuvel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMj1kXHxhi06=h_L6+JkPrxyrXrf-2W4xotjYBPPZ+esWG8qLQ@mail.gmail.com' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox