From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Matthew Wilcox <willy@infradead.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@suse.de>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/kexec: Make kexec work in 5-level paging mode
Date: Mon, 29 Jan 2018 16:48:00 +0300 [thread overview]
Message-ID: <20180129134800.a3sbcqzdy6vd5jjy@node.shutemov.name> (raw)
In-Reply-To: <20180129115927.GB18247@bombadil.infradead.org>
On Mon, Jan 29, 2018 at 03:59:27AM -0800, Matthew Wilcox wrote:
> On Mon, Jan 29, 2018 at 02:08:45PM +0300, Kirill A. Shutemov wrote:
> > I've missed that we need to change relocate_kernel() to set CR4.LA57
> > flag if the kernel has 5-level paging enabled.
> >
> > I avoided to use ifdef CONFIG_X86_5LEVEL here and inferred if we need to
> > enabled 5-level paging from previous CR4 value. This way the code is
> > ready for boot-time switching between paging modes.
>
> Forgive me if I'm missing something ... can you kexec a 5-level kernel
> from a 4-level kernel or vice versa?
With this patch you can kexec from 4-to-5 and from 5-to-5 in addition to
current 4-to-4. 4-to-5 basically takes the same path as UEFI boot in new
kernel.
I think I will be able to make 5-to-4 work too, when boot-time switching
code will be upstream, assuming both kernels are build from the tree with
boot-time switching support and the new kernel is loaded below 128TiB.
For 5-to-4, kernel decompression code of the new kernel starts on 5-level
paging identity mapping constructed by caller. Decompression code then
would switch over to 4-level paging via 32-bit trampoline (we cannot
switch between 4- and 5-level paging directly) and proceed as in normal
boot.
Let me check.
--
Kirill A. Shutemov
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2018-01-29 13:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 11:08 Kirill A. Shutemov
2018-01-29 11:19 ` Baoquan He
2018-01-29 13:00 ` Baoquan He
2018-01-29 11:59 ` Matthew Wilcox
2018-01-29 13:48 ` Kirill A. Shutemov [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-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=20180129134800.a3sbcqzdy6vd5jjy@node.shutemov.name \
--to=kirill@shutemov.name \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=willy@infradead.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