lkml.org 
[lkml]   [2020]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/speculation/srbds: do not try to turn mitigation off when not supported
On Tue, Jun 09, 2020 at 02:43:13PM -0300, Thadeu Lima de Souza Cascardo wrote:
> When SRBDS is mitigated by TSX OFF, update_srbds_msr will still read and

Are you talking about this case in srbds_select_mitigation():

if ((ia32_cap & ARCH_CAP_MDS_NO) && !boot_cpu_has(X86_FEATURE_RTM))
srbds_mitigation = SRBDS_MITIGATION_TSX_OFF;

?

and you have a system which:

* Check to see if this is one of the MDS_NO systems supporting
* TSX that are only exposed to SRBDS when TSX is enabled.

i.e., no SRBDS microcode for it and the fix is to disable TSX?

If so, I think the right fix should be to do:

if (!boot_cpu_has(X86_FEATURE_SRBDS_CTRL))
return;

in update_srbds_msr() with a comment above it explaining why that check
is being done.

Hmmm.

--
Regards/Gruss,
Boris.

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

\
 
 \ /
  Last update: 2020-06-15 10:30    [W:0.052 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site