From: Mike Rapoport <rppt@linux.ibm.com>
To: Juergen Gross <jgross@suse.com>
Cc: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Ingo Molnar" <mingo@redhat.com>, "Borislav Petkov" <bp@suse.de>,
"Thomas Gleixner" <tglx@linutronix.de>,
x86@kernel.org, linux-kernel@vger.kernel.org,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: Linux 5.13+ as Xen dom0 crashes on Ryzen CPU (ucode loading related?)
Date: Tue, 14 Sep 2021 11:33:21 +0300 [thread overview]
Message-ID: <YUBeUZdduCAbOQJN@linux.ibm.com> (raw)
In-Reply-To: <923de2f5-3d33-4c02-acec-739fdaf2ae05@suse.com>
On Tue, Sep 14, 2021 at 09:14:38AM +0200, Juergen Gross wrote:
> On 13.09.21 14:50, Marek Marczykowski-Górecki wrote:
> > Hi,
> >
> > Since 5.13, the Xen (PV) dom0 crashes on boot, before even printing the
> > kernel version.
> > Test environment:
> > - Xen 4.14.2
> > - AMD Ryzen 5 4500U (reported also on AMD Ryzen 7 4750U)
> > - Linux 5.13.13, confirmed also on 5.14
> >
> > The crash happens only if the initramfs has earlycpio with microcode.
> > I don't have a serial console, but I've got a photo with crash message
> > (from Xen, Linux doesn't managed to print anything):
> > https://user-images.githubusercontent.com/726704/133084966-5038f37e-001b-4688-9f90-83d09be3dc2d.jpg
> >
> > Transcription of some of it:
> >
> > mapping kernel into physical memory
> > about to get started
> > (XEN) Pagetable walk from ffffffff82810888:
> > (XEN) L4[0x1ff] = 0000000332815067 0000000000002815
> > (XEN) L3[0x1fe] = 0000000332816067 0000000000002816
> > (XEN) L2[0x014] = 0000000334018067 0000000000004018
> > (XEN) L1[0x010] = 0000000332810067 0000000000002810
> > (XEN) domain_crash_sync called from entry.S: fault at ffff82d04033e790 x86_64/entry.S#domain_crash_page_fault
> > (XEN) Domain 0 (vcpu#0) crashed on cpu#0:
> > (XEN) ----[ Xen-4.14.2 x86_64 debug=n Not tainted ]----
> > (XEN) CPU: 0
> > (XEN) RIP: e033:[<0000000000000000>]
>
> The domain's run state seems to be completely clobbered.
>
> Did you try to boot the kernel with "earlyprintk=xen" to get some idea
> how far it progressed?
>
> I could imagine that doing the early reservations after the call of
> e820__memory_setup() is problematic, as Xen PV guests have a hook in
> this function performing some rather extended actions.
Right, among them it may relocate initrd:
https://elixir.bootlin.com/linux/latest/source/arch/x86/xen/setup.c#L872
and this may cause the reported crash.
> I'm not sure the call of early_reserve_memory() can be moved just before
> the e820__memory_setup() call. If this is possibel it should be done
> IMO, if not then the reservations which have been at the start of
> setup_arch() might need to go there again.
early_reserve_memory() can be moved to the beginning of setup_arch().
Anther possibility is to move initrd relocation out of xen_setup_memory()
and maybe even integrate it somehow in reserve_initrd().
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2021-09-14 8:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 12:50 Linux 5.13+ as Xen dom0 crashes on Ryzen CPU (ucode loading related?) Marek Marczykowski-Górecki
2021-09-14 5:48 ` Mike Rapoport
2021-09-14 7:14 ` Juergen Gross
2021-09-14 8:33 ` Mike Rapoport [this message]
2021-09-14 8:42 ` Juergen Gross
2021-09-14 8:39 ` Jan Beulich
2021-09-14 10:51 ` Marek Marczykowski-Górecki
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-all 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=YUBeUZdduCAbOQJN@linux.ibm.com \
--to=rppt@linux.ibm.com \
--cc=bp@suse.de \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marmarek@invisiblethingslab.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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