lkml.org 
[lkml]   [2022]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] x86/speculation/srbds: do not try to turn mitigation off when not supported
On Thu, Mar 31, 2022 at 05:25:27PM +0200, Borislav Petkov wrote:
>On Thu, Mar 31, 2022 at 03:18:42PM +0200, Ricardo Cañuelo wrote:
>> Just to clarify, this changes the behavior wrt the hypervisor case:
>> currently it just bails out of update_srbds_msr(), with your patch it'd
>> clear RNGDS_MITG_DIS from MSR_IA32_MCU_OPT_CTRL. Is that what you
>> intended?

Yes, this should be fine as update_srbds_msr() would also check for
X86_FEATURE_SRBDS_CTRL. If a hypervisor doesn't want a guest to write to
the MSR it should not export X86_FEATURE_SRBDS_CTRL.

>Just do the simple thing I pasted earlier - no need to rewrite the whole
>function for no good reason.

I was trying to address earlier comment on split logic in two functions.
I am okay with keeping it as is (and just adding X86_FEATURE_SRBDS_CTRL
check in update_srbds_msr()).

Thanks,
Pawan

\
 
 \ /
  Last update: 2022-03-31 18:26    [W:0.099 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site