lkml.org 
[lkml]   [2018]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v2 4/8] x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature
    From
    Date


    On 01/06/2018 06:41 AM, Konrad Rzeszutek Wilk wrote:
    > On Fri, Jan 05, 2018 at 06:12:19PM -0800, Tim Chen wrote:
    >> From: Tim Chen <tim.c.chen@linux.intel.com>
    >> From: Andrea Arcangeli <aarcange@redhat.com>
    >>
    >
    >>
    >> .macro DISABLE_IBRS
    >> - ALTERNATIVE "jmp .Lskip_\@", "", X86_FEATURE_SPEC_CTRL
    >> + testl $1, dynamic_ibrs
    >
    > On every system call we end up hammering on this 'dynamic_ibrs'
    > variable. And it looks like it can be flipped via the IPI mechanism.

    On system call, we read dynamic_ibrs value (not change it) and
    flip the IBRS msr only if it dynamic_ibrs is true.

    We only do global change to all the IBRS msrs on all cpus during
    the admin request to change its value, serialized by
    spec_ctrl_mutex. Before we do that, we set dynamic_ibrs to 0,
    so each cpu no longer do any change to IBRS. Then the IPI happens
    to update the IBRS MSR values.

    >
    > Would it make sense for this to be per-cpu?
    >

    \
     
     \ /
      Last update: 2018-01-06 19:21    [W:4.505 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site