From ac66a73be03a0a72aeeb33d3610cfc43cb101a0b Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 25 Mar 2026 16:01:47 -0700 Subject: [PATCH 1/2] x86/fred: Enable FRED by default When FRED was added to the mainline kernel, it was set up as an explicit opt-in due to the risk of regressions before hardware was available publicly. Now, Panther Lake (Core Ultra 300 series) has been released, and benchmarking by Phoronix has shown that it provides a significant performance benefit on most workloads: https://www.phoronix.com/review/intel-fred-panther-lake Accordingly, enable FRED by default if the CPU supports it. FRED can of course still be disabled via the fred=off command line option. Touch up Kconfig help too. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Sohil Mehta Link: https://patch.msgid.link/20260325230151.1898287-2-hpa@zytor.com --- Documentation/admin-guide/kernel-parameters.txt | 4 ++-- arch/x86/Kconfig | 2 +- arch/x86/kernel/cpu/common.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 03a550630644..bfa8a20ccc37 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -1750,8 +1750,8 @@ Kernel parameters fred= [X86-64] Enable/disable Flexible Return and Event Delivery. Format: { on | off } - on: enable FRED when it's present. - off: disable FRED, the default setting. + on: enable FRED when it's present, the default setting. + off: disable FRED. ftrace=[tracer] [FTRACE] will set and start the specified tracer diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e2df1b147184..876b663dcf38 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -557,7 +557,7 @@ config X86_FRED bool "Flexible Return and Event Delivery" depends on X86_64 help - When enabled, try to use Flexible Return and Event Delivery + When enabled, use Flexible Return and Event Delivery instead of the legacy SYSCALL/SYSENTER/IDT architecture for ring transitions and exception/interrupt handling if the system supports it. diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index a8ff4376c286..0b02cb038d7f 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1746,7 +1746,7 @@ static void __init cpu_parse_early_param(void) /* Minimize the gap between FRED is available and available but disabled. */ arglen = cmdline_find_option(boot_command_line, "fred", arg, sizeof(arg)); - if (arglen != 2 || strncmp(arg, "on", 2)) + if (arglen == 3 && !strncmp(arg, "off", 3)) setup_clear_cpu_cap(X86_FEATURE_FRED); arglen = cmdline_find_option(boot_command_line, "clearcpuid", arg, sizeof(arg)); From f0958d588e6de263224ca92087b45ce72fa25c91 Mon Sep 17 00:00:00 2001 From: Sohil Mehta Date: Wed, 25 Mar 2026 16:01:49 -0700 Subject: [PATCH 2/2] x86/fred: Remove kernel log message when initializing exceptions When FRED is enabled, its initialization message is printed for every CPU during boot as well as during suspend-resume. This debug message can be noisy and it isn't very useful unless someone is debugging FRED itself. As FRED is enabled by default, remove the log message as mentioned in the code comment. Signed-off-by: Sohil Mehta Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/20260325230151.1898287-4-hpa@zytor.com --- arch/x86/kernel/fred.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/kernel/fred.c b/arch/x86/kernel/fred.c index e736b19e18de..117aa06d25ca 100644 --- a/arch/x86/kernel/fred.c +++ b/arch/x86/kernel/fred.c @@ -27,9 +27,6 @@ EXPORT_PER_CPU_SYMBOL(fred_rsp0); void cpu_init_fred_exceptions(void) { - /* When FRED is enabled by default, remove this log message */ - pr_info("Initialize FRED on CPU%d\n", smp_processor_id()); - /* * If a kernel event is delivered before a CPU goes to user level for * the first time, its SS is NULL thus NULL is pushed into the SS field