lkml.org 
[lkml]   [2021]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] x86/tsx: Clear CPUID bits when TSX always force aborts
On Wed, Jun 09, 2021 at 02:13:38PM -0700, Pawan Gupta wrote:
> @@ -114,6 +127,26 @@ void __init tsx_init(void)
> tsx_ctrl_state = TSX_CTRL_ENABLE;
> }
>
> + /*
> + * Hardware will always abort a TSX transaction if both CPUID bits
> + * RTM_ALWAYS_ABORT and TSX_FORCE_ABORT are enumerated. In this case it
> + * is better not to enumerate CPUID.RTM and CPUID.HLE bits. Clear them
> + * here.
> + */
> + if (boot_cpu_has(X86_FEATURE_RTM_ALWAYS_ABORT) &&
> + boot_cpu_has(X86_FEATURE_TSX_FORCE_ABORT)) {
> + tsx_ctrl_state = TSX_CTRL_RTM_ALWAYS_ABORT;
> + tsx_clear_cpuid();
> + setup_clear_cpu_cap(X86_FEATURE_RTM);
> + setup_clear_cpu_cap(X86_FEATURE_HLE);
> + return;
> + }

Why isn't this happening as the first thing on entry in that tsx_init()
function? IOW, there's no point to noodle through cmdline options etc if
the hardware will always abort transactions.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2021-06-11 12:06    [W:0.100 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site