From: Borislav Petkov <bp@alien8.de>
To: Baoquan He <bhe@redhat.com>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [RFC PATCH 2/2] Revert "x86/boot: Add xloadflags bits to check for 5-level paging support"
Date: Fri, 1 Mar 2024 19:56:18 +0100 [thread overview]
Message-ID: <20240301185618.19663-3-bp@alien8.de> (raw)
In-Reply-To: <20240301185618.19663-1-bp@alien8.de>
From: "Borislav Petkov (AMD)" <bp@alien8.de>
This reverts commit f2d08c5d3bcf3f7ef788af122b57a919efa1e9d0.
This whole dynamic switching support is silly. I don't see a use case
where one would use an old kernel with CONFIG_X86_5LEVEL disabled to
kexec into. I.e., you use pretty much the same kernel.
But I'm open to corrections.
Commit message of
f2d08c5d3bcf ("x86/boot: Add xloadflags bits to check for 5-level paging support")
claims:
The flags will be used by the kernel kexec subsystem and the userspace
kexec tools.
but they're nowhere to be found in kexec tools:
[ ~/src/kexec-tools> git describe
v2.0.28-4-g6ee2ac1bf739
[ ~/src/kexec-tools> git grep XLF_5LEVEL
[ ~/src/kexec-tools>
Zap it all.
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
---
| 12 +-----------
arch/x86/include/uapi/asm/bootparam.h | 2 --
2 files changed, 1 insertion(+), 13 deletions(-)
--git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index a1bbedd989e4..0f261224acef 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -364,17 +364,7 @@ xloadflags:
# define XLF4 0
#endif
-#ifdef CONFIG_X86_64
-#ifdef CONFIG_X86_5LEVEL
-#define XLF56 (XLF_5LEVEL|XLF_5LEVEL_ENABLED)
-#else
-#define XLF56 XLF_5LEVEL
-#endif
-#else
-#define XLF56 0
-#endif
-
- .word XLF0 | XLF1 | XLF23 | XLF4 | XLF56
+ .word XLF0 | XLF1 | XLF23 | XLF4
cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line,
#added with boot protocol
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
index 4a38e7917756..b53b524f6ed2 100644
--- a/arch/x86/include/uapi/asm/bootparam.h
+++ b/arch/x86/include/uapi/asm/bootparam.h
@@ -22,8 +22,6 @@
#define XLF_EFI_HANDOVER_32 (1<<2)
#define XLF_EFI_HANDOVER_64 (1<<3)
#define XLF_EFI_KEXEC (1<<4)
-#define XLF_5LEVEL (1<<5)
-#define XLF_5LEVEL_ENABLED (1<<6)
#ifndef __ASSEMBLY__
--
2.43.0
prev parent reply other threads:[~2024-03-01 18:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 18:56 [RFC PATCH 0/2] x86/kexec: Revert 5level dynamic switching Borislav Petkov
2024-03-01 18:56 ` [RFC PATCH 1/2] Revert "x86/kexec/64: Prevent kexec from 5-level paging to a 4-level only kernel" Borislav Petkov
2024-03-04 10:51 ` Baoquan He
2024-03-04 11:11 ` Borislav Petkov
2024-03-05 3:43 ` Baoquan He
2024-03-05 11:55 ` Borislav Petkov
2024-03-06 4:02 ` Baoquan He
2024-03-01 18:56 ` Borislav Petkov [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=20240301185618.19663-3-bp@alien8.de \
--to=bp@alien8.de \
--cc=bhe@redhat.com \
--cc=linux-kernel@vger.kernel.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