From: "tip-bot for Kirill A. Shutemov" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: wei@redhat.com, bp@suse.de, mingo@kernel.org,
kirill.shutemov@linux.intel.com, mingo@redhat.com, hpa@zytor.com,
kyle.d.pelton@intel.com, linux-kernel@vger.kernel.org,
tglx@linutronix.de, x86@kernel.org
Subject: [tip:x86/cleanups] x86/boot/compressed/64: Explain paging_prepare()'s return value
Date: Wed, 6 Feb 2019 10:13:07 -0800 [thread overview]
Message-ID: <tip-82434d23f36de42f70925f70d645ed3b1394361b@git.kernel.org> (raw)
In-Reply-To: <20190206154756.matwldebbxkmlnae@black.fi.intel.com>
Commit-ID: 82434d23f36de42f70925f70d645ed3b1394361b
Gitweb: https://git.kernel.org/tip/82434d23f36de42f70925f70d645ed3b1394361b
Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
AuthorDate: Wed, 6 Feb 2019 18:29:08 +0300
Committer: Borislav Petkov <bp@suse.de>
CommitDate: Wed, 6 Feb 2019 19:08:34 +0100
x86/boot/compressed/64: Explain paging_prepare()'s return value
paging_prepare() returns a two-quadword structure which lands
into RDX:RAX:
- Address of the trampoline is returned in RAX.
- Non zero RDX means trampoline needs to enable 5-level paging.
Document that explicitly.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: dave.hansen@linux.intel.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kyle D Pelton <kyle.d.pelton@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wei Huang <wei@redhat.com>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190206154756.matwldebbxkmlnae@black.fi.intel.com
---
arch/x86/boot/compressed/head_64.S | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index b27b338d2f6d..73b9d7e91a9c 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -358,8 +358,11 @@ ENTRY(startup_64)
* paging_prepare() sets up the trampoline and checks if we need to
* enable 5-level paging.
*
- * Address of the trampoline is returned in RAX.
- * Non zero RDX on return means we need to enable 5-level paging.
+ * paging_prepare() returns a two-quadword structure which lands
+ * into RDX:RAX:
+ * - Address of the trampoline is returned in RAX.
+ * - Non zero RDX means trampoline needs to enable 5-level
+ * paging.
*
* RSI holds real mode data and needs to be preserved across
* this function call.
@@ -565,7 +568,7 @@ adjust_got:
*
* RDI contains the return address (might be above 4G).
* ECX contains the base address of the trampoline memory.
- * Non zero RDX on return means we need to enable 5-level paging.
+ * Non zero RDX means trampoline needs to enable 5-level paging.
*/
ENTRY(trampoline_32bit_src)
/* Set up data and stack segments */
next prev parent reply other threads:[~2019-02-06 18:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 11:52 [PATCH] x86/boot/compressed/64: Do not corrupt EDX on EFER.LME=1 setting Kirill A. Shutemov
2019-02-06 15:21 ` Borislav Petkov
2019-02-06 15:47 ` Kirill A. Shutemov
2019-02-06 18:11 ` Borislav Petkov
2019-02-06 18:13 ` tip-bot for Kirill A. Shutemov [this message]
2019-02-06 18:04 ` [tip:x86/urgent] " tip-bot for Kirill A. Shutemov
2019-02-06 19:50 ` [PATCH] " Wei Huang
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=tip-82434d23f36de42f70925f70d645ed3b1394361b@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kyle.d.pelton@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=wei@redhat.com \
--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
Powered by JetHome