[PATCH 1/3] x86/entry: remove unneeded kernel cr3 switching
From: Lai Jiangshan
Date: Sun Apr 19 2020 - 10:41:05 EST
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@xxxxxxxxxxxxxxxxx>
---
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