From: Lai Jiangshan <laijs@linux.alibaba.com>
To: linux-kernel@vger.kernel.org
Cc: Lai Jiangshan <laijs@linux.alibaba.com>,
Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH 1/3] x86/entry: remove unneeded kernel cr3 switching
Date: Sun, 19 Apr 2020 14:40:47 +0000 [thread overview]
Message-ID: <20200419144049.1906-2-laijs@linux.alibaba.com> (raw)
In-Reply-To: <20200419144049.1906-1-laijs@linux.alibaba.com>
When native_load_gs_index() fails on .Lgs_change, the cr3
must be kernel cr3. Don't need to switch it.
Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
---
arch/x86/entry/entry_64.S | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index 0e9504fabe52..b789835afbab 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -1339,7 +1339,6 @@ SYM_CODE_START_LOCAL(error_entry)
*/
SWAPGS
FENCE_SWAPGS_USER_ENTRY
- SWITCH_TO_KERNEL_CR3 scratch_reg=%rax
jmp .Lerror_entry_done
.Lbstep_iret:
--
2.20.1
next prev parent reply other threads:[~2020-04-19 14:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-19 14:40 [PATCH 0/3] x86: cleanups Lai Jiangshan
2020-04-19 14:40 ` Lai Jiangshan [this message]
2020-05-07 15:16 ` [tip: x86/entry] x86/entry/64: Remove unneeded kernel CR3 switching tip-bot2 for Lai Jiangshan
2020-04-19 14:40 ` [PATCH 2/3] x86: remove address operator on function machine_check() Lai Jiangshan
2020-05-07 15:16 ` [tip: x86/entry] x86/idt: Remove " tip-bot2 for Lai Jiangshan
2020-04-19 14:40 ` [PATCH 3/3] x86/entry: remove an unused label Lai Jiangshan
2020-05-07 15:16 ` [tip: x86/entry] x86/entry/64: Remove " tip-bot2 for Lai Jiangshan
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=20200419144049.1906-2-laijs@linux.alibaba.com \
--to=laijs@linux.alibaba.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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