lkml.org 
[lkml]   [2018]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 26/35] x86/enter: Create macros to stop/restart Indirect Branch Speculation
On Thu, Jan 18, 2018 at 02:48:26PM +0100, Peter Zijlstra wrote:
> From: Tim Chen <tim.c.chen@linux.intel.com>
>
> +
> +.macro STOP_IB_SPEC
> + ALTERNATIVE "jmp .Lskip_\@", "", X86_FEATURE_IBRS

Peter,

Will it be possible to use static key here like
STATIC_JUMP_IF_FALSE .Lskip_\@, specctrl_ibrs, def=0

In Thomas' original patchset, there is a specctrl_ibrs static key.

That will make a switch of static branch here easier if we want
to change it later in boot or at run time.

Tim

> + PUSH_MSR_REGS
> + WRMSR_ASM $MSR_IA32_SPEC_CTRL, $0, $SPEC_CTRL_ENABLE_IBRS
> + POP_MSR_REGS
> +.Lskip_\@:
> +.endm
> +

\
 
 \ /
  Last update: 2018-01-18 20:45    [W:0.348 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site