From: Jan Kiszka <jan.kiszka@siemens.com>
To: Andy Lutomirski <luto@kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>, x86 <x86@kernel.org>,
linux-efi <linux-efi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
Matt Fleming <matt@codeblueprint.co.uk>,
Thomas Gleixner <tglx@linutronix.de>,
Brian Gerst <brgerst@gmail.com>,
Thomas Garnier <thgarnie@google.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
Juergen Gross <jgross@suse.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [tip:x86/mm] x86/boot/32: Defer resyncing initial_page_table until per-cpu is set up
Date: Mon, 8 May 2017 14:34:13 +0200 [thread overview]
Message-ID: <7f5916b5-01c0-52d5-9f44-dee4bf355212@siemens.com> (raw)
In-Reply-To: <CALCETrXzzhoyzyqp5s7sSOkAtsR2Cor6j+x16OLv=+G30Y6+WQ@mail.gmail.com>
On 2017-05-08 13:21, Andy Lutomirski wrote:
> On Mon, May 8, 2017 at 2:32 AM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>> On Mon, May 8, 2017 at 9:31 AM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>> On 2017-03-23 10:14, tip-bot for Andy Lutomirski wrote:
>>>> The x86 smpboot trampoline expects initial_page_table to have the
>>>> GDT mapped. If the GDT ends up in a virtually mapped per-cpu page,
>>>> then it won't be in the page tables at all until perc-pu areas are
>>>> set up. The result will be a triple fault the first time that the
>>>> CPU attempts to access the GDT after LGDT loads the perc-pu GDT.
>>>>
>>>> This appears to be an old bug, but somehow the GDT fixmap rework
>>>> is triggering it. This seems to have something to do with the
>>>> memory layout.
>>
>>> This breaks the boot on our Intel Quark platform (IOT2000, similar to
>>> Galileo Gen2). Reverting it over master makes it work again. Any idea
>>> what goes wrong? Let me know how I can help debugging this.
>>
>> JFYI: As of today linux-next when _kexec:ed_ works fine to me
>>
>> Perhaps I can test this later with direct boot from SD card.
>>
>
> The most likely explanation is that there's some code that needs the
> page table synced and runs before setup_per_cpu_areas(). The relevant
> init code is:
>
> setup_arch(&command_line);
> mm_init_cpumask(&init_mm);
> setup_command_line(command_line);
> setup_nr_cpu_ids();
> setup_per_cpu_areas();
>
> so I didn't move it very far. It would be awesome if we could get a
> backtrace when the failure happens, but it's likely to be a triple
> fault. Is this an EFI boot? I bet the failure is in efi_init().
Yes, it's an EFI thing. Unfortunately, I didn't make
earlycon/earlyprintk work yet.
>
> Could you try reverting just the deletions in the patch? I.e. try a
> kernel with both the old and the new copies of the code I moved.
Let me try that later. I can also move the new code around to nail down
the dependency.
Jan
--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2017-05-08 12:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-22 21:32 [PATCH 0/7] Misc GDT fixes and a cleanup Andy Lutomirski
2017-03-22 21:32 ` [PATCH 1/7] selftests/x86/ldt_gdt_32: Work around a glibc sigaction bug Andy Lutomirski
2017-03-23 9:13 ` [tip:x86/mm] selftests/x86/ldt_gdt_32: Work around a glibc sigaction() bug tip-bot for Andy Lutomirski
2017-03-22 21:32 ` [PATCH 2/7] x86/gdt: Fix setup_fixmap_gdt() to use the correct PA Andy Lutomirski
2017-03-23 9:13 ` [tip:x86/mm] " tip-bot for Andy Lutomirski
2017-03-22 21:32 ` [PATCH 3/7] x86/efi/32: Fix EFI on systems where the percpu GDT is virtually mapped Andy Lutomirski
2017-03-23 9:14 ` [tip:x86/mm] x86/efi/32: Fix EFI on systems where the per-cpu " tip-bot for Andy Lutomirski
2017-03-22 21:32 ` [PATCH 4/7] x86/boot/32: Defer resyncing initial_page_table until percpu is set up Andy Lutomirski
2017-03-23 9:14 ` [tip:x86/mm] x86/boot/32: Defer resyncing initial_page_table until per-cpu " tip-bot for Andy Lutomirski
2017-05-08 6:31 ` Jan Kiszka
2017-05-08 9:32 ` Andy Shevchenko
2017-05-08 11:21 ` Andy Lutomirski
2017-05-08 12:34 ` Jan Kiszka [this message]
2017-05-08 14:45 ` Andy Shevchenko
2017-05-08 15:24 ` Jan Kiszka
2017-05-08 17:53 ` Jan Kiszka
2017-05-09 0:03 ` Andy Lutomirski
2017-03-22 21:32 ` [PATCH 5/7] x86/gdt: Get rid of the get_*_gdt_*_vaddr() helpers Andy Lutomirski
2017-03-23 9:15 ` [tip:x86/mm] " tip-bot for Andy Lutomirski
2017-03-22 21:32 ` [PATCH 6/7] x86/xen/gdt: Use X86_FEATURE_XENPV instead of globals for the GDT fixup Andy Lutomirski
2017-03-23 9:15 ` [tip:x86/mm] " tip-bot for Andy Lutomirski
2017-03-22 21:32 ` [PATCH 7/7] x86/boot/32: Rewrite test_wp_bit() Andy Lutomirski
2017-03-23 7:31 ` [PATCH 0/7] Misc GDT fixes and a cleanup Ingo Molnar
2017-03-23 12:18 ` Boris Ostrovsky
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=7f5916b5-01c0-52d5-9f44-dee4bf355212@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=andy.shevchenko@gmail.com \
--cc=ard.biesheuvel@linaro.org \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=jpoimboe@redhat.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=thgarnie@google.com \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®