From nobody Thu Apr 9 10:32:03 2026 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 611643E025C for ; Mon, 23 Mar 2026 20:32:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774297944; cv=none; b=BMCTU70pEGF2wOJ5hRBNL7zhxHfVyXAPe7hvl0Tuf51jB2KuiJ7X3GdMiI8/sxRedUcFkGNP0ELD3EAup0/hezAE2Em/oH7idfsayUZymn8Px7vuQz7VM4lvTzw8MjShwMh4ejxr/BoD99JCQfwymW6mwKWk2eGfoJ6J/zObtW4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774297944; c=relaxed/simple; bh=EtBxiaYVJJqm/sAPRSsnzjkqE1iXbkMedqYQ+TWLC7E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Mnk6KRHrzX3Uevf6FO4aquawWv6KX/FCmgemS8R9+qIso4OsZW3hhfZSiIyF94+BhKWfgrCpxsL3aEWcZAya8arQ0/r1fMh1sgYTX1EbihNkRvWnqbszX6LO1vskC1NgeqRdJJ9wBWUIQ6DIRtI0EPS23bd8/GBLDwe+L7XxkO8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=FofKg0BD; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="FofKg0BD" Received: from mail.zytor.com (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 62NKFZsC3117893 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 23 Mar 2026 13:15:36 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 62NKFZsC3117893 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2026022301; t=1774296937; bh=AnT9Ggxdoc1C634ddf0H0+2ezBZPduQkoDk2fK0pU/A=; h=From:To:Cc:Subject:Date:From; b=FofKg0BDkMB6x2QA6BoaFJECChfbv8uN1xIwo5rNXNBijkukAthlbEbZxkEJ/9bMF uT0mXqnPPJKt1n0yFq1mK65du4FJjq6F4OuoDQgFgRPKxpL6ni9EI46DkIqUuE47Bq Zzlx7K9DK//iL6YLqoM7tqVlWMyoA7N/q/ofZdpC/0t5SUAFv00gJ1CWQMAKg2aaJr 2ANlYRejwBf0VBvnQShzBgThjKuDDFScd0037zzlNICtl9KlisVVXoaoYPsZ4COo1f MStVSoBOWDhEKXaKEdlaxsGLj5zSVIJL5+WMCVfCPhco9SbOTwE9YqI5bM1fUSocrl qRJ3hwSubbjBA== From: "H. Peter Anvin" To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: "Peter Zijlstra (Intel)" , Kees Cook , Xin Li , "Ahmed S. Darwish" , Sohil Mehta , linux-kernel@vger.kernel.org Subject: [PATCH 0/2] x86/fred: enable FRED by default Date: Mon, 23 Mar 2026 13:15:03 -0700 Message-ID: <20260323201510.1537333-1-hpa@zytor.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: H. Peter Anvin (Intel) 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=3Doff command line option. Acked-by: Peter Zijlstra (Intel) --- 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/Documentatio= n/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=3D [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. =20 ftrace=3D[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..e22a49869380 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) =20 /* Minimize the gap between FRED is available and available but disabled.= */ arglen =3D cmdline_find_option(boot_command_line, "fred", arg, sizeof(arg= )); - if (arglen !=3D 2 || strncmp(arg, "on", 2)) + if (arglen > 0 && (arglen !=3D 2 || strncmp(arg, "on", 2))) setup_clear_cpu_cap(X86_FEATURE_FRED); =20 arglen =3D cmdline_find_option(boot_command_line, "clearcpuid", arg, size= of(arg));