[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180118194452.GA6849@linux.intel.com>
Date: Thu, 18 Jan 2018 11:44:53 -0800
From: Tim Chen <tim.c.chen@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: David Woodhouse <dwmw2@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Josh Poimboeuf <jpoimboe@...hat.com>,
linux-kernel@...r.kernel.org, Dave Hansen <dave.hansen@...el.com>,
Ashok Raj <ashok.raj@...el.com>,
Andy Lutomirski <luto@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg KH <gregkh@...uxfoundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Andi Kleen <ak@...ux.intel.com>,
Arjan Van De Ven <arjan.van.de.ven@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Jun Nakajima <jun.nakajima@...el.com>,
Asit Mallick <asit.k.mallick@...el.com>,
Jason Baron <jbaron@...mai.com>,
David Woodhouse <dwmw@...zon.co.uk>
Subject: Re: [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@...ux.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
> +
Powered by blists - more mailing lists