[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240529152850.1227756-1-nik.borisov@suse.com>
Date: Wed, 29 May 2024 18:28:50 +0300
From: Nikolay Borisov <nik.borisov@...e.com>
To: linux-kernel@...r.kernel.org
Cc: x86@...nel.org,
Nikolay Borisov <nik.borisov@...e.com>
Subject: [PATCH] x86/kexec: Remove spurious jmp 1f from from identity_mapped()
This seemingly straightforward jmp was introduced in the initial version
of the the 64bit kexec code without any explanation. It turns out (check
accompanying link) it's likely a copy/paste artefact from 32bit code,
where such a jmp could be used as a serialising instruction for the 486's
prefetch queue. On x86_64 that's not needed beacuse there's already a
preceding write to cr4 which itself is a serialising operation.
Link: https://lore.kernel.org/all/55bc0649-c017-49ab-905d-212f140a403f@citrix.com/
Signed-off-by: Nikolay Borisov <nik.borisov@...e.com>
---
arch/x86/kernel/relocate_kernel_64.S | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 56cab1bb25f5..54e620021c7e 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -153,9 +153,6 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
1:
movq %rax, %cr4
- jmp 1f
-1:
-
/* Flush the TLB (needed?) */
movq %r9, %cr3
--
2.34.1
Powered by blists - more mailing lists