From nobody Thu Apr 2 23:55:29 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 9AB0B33291F for ; Wed, 25 Mar 2026 23:18:32 +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=1774480714; cv=none; b=PJk8b04h5c/ewaxVTbif0H5K/Qhl7Tp0WxMaihF/Dp4euphq9ruXbNUx6THEBjLwOk6Uw25hz1PKvBBjsS2kIImPaymJcP1dqrNuy42O9QWW97+H3vSGOhTtx+Q7I/DJWgtp8Vp+E9bEf4Pr1DF/4e6vBI9MWEQBvMHnq923UoM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774480714; c=relaxed/simple; bh=GYjrRujWZr6ZzcKFlW1ZjJkq55V2LJOPcF2VMUWqJoU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VzfnWMcpBb3d5PRqgfopysLEM409+zZ4V7pkze7ElMsusMtMqLdwXJhFbsxPr9VXtfVMpLdad0kR5NwZyMAakwd0bOtsRVhM2oKdojT4bZ8ROxOaZ/EU+S5n1Kf7MCS+xR1ePjUu90uIL7mS6hZgyAvKR17z0PJSfBkhp2meEY0= 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=Lb0R9+yL; 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="Lb0R9+yL" 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 62PN21bp3806967 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 25 Mar 2026 16:02:02 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 62PN21bp3806967 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2026022301; t=1774479723; bh=wDfCp1rKihli2qDbl9z2phzNdoM1fAycpdH5Y/n1WWc=; h=From:To:Cc:Subject:Date:From; b=Lb0R9+yLuJcCYqyUgH0RGu2zX1MKjpa+w8YBIFXdKNcphtCaMSwiUUy/rLRcAdEqx RWtAumXFMjiwiQCjBeqVPU2cKWzBJUP/oPq29TChxRjf+/SIwTL8qhm2qBwSZ9pY98 4H/fXsLQ7us/iYb6qZJVNNoCAsNuSIRvNsLOuaDyPfv2v7hmDDcKaErdzDl4pZ9gtN CQYBQz6OH2DVnA3ItL95UVZh+7LMO+NTz2cfGA/XjebwVhkEJLvz6zgQfpHeCJqu8S VQJIJqOHSrahRhWvuX4rycRPn/2hSLKGJ1NiS5cBNnqmxJMERRwKAcHcpKiXMrWBQh TeS9EMvudukMg== 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 v2 0/3] x86/fred: enable FRED by default Date: Wed, 25 Mar 2026 16:01:46 -0700 Message-ID: <20260325230151.1898287-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. Changes in v2: - Ignore fred=3D options other than fred=3D{on,off}. In practice of course this means options other than fred=3Doff. - Remove FRED initialization message during CPU bringup (Sohil Mehta) --- Documentation/admin-guide/kernel-parameters.txt | 4 ++-- arch/x86/Kconfig | 2 +- arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/fred.c | 3 --- 4 files changed, 4 insertions(+), 7 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..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) =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 =3D=3D 3 && !strncmp(arg, "off", 3)) setup_clear_cpu_cap(X86_FEATURE_FRED); =20 arglen =3D cmdline_find_option(boot_command_line, "clearcpuid", arg, size= of(arg)); 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); =20 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