Re: [Patch v7 10/18] x86/speculation: Turn on or off STIBP according to a task's TIF_STIBP

2018-11-21 Thread Thomas Gleixner
On Tue, 20 Nov 2018, Tim Chen wrote: > diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c > index 74bef48..48fcd46 100644 > --- a/arch/x86/kernel/process.c > +++ b/arch/x86/kernel/process.c > @@ -406,6 +406,8 @@ static __always_inline void spec_ctrl_update_msr(unsigned > long

Re: [Patch v7 10/18] x86/speculation: Turn on or off STIBP according to a task's TIF_STIBP

2018-11-21 Thread Thomas Gleixner
On Tue, 20 Nov 2018, Tim Chen wrote: > diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c > index 74bef48..48fcd46 100644 > --- a/arch/x86/kernel/process.c > +++ b/arch/x86/kernel/process.c > @@ -406,6 +406,8 @@ static __always_inline void spec_ctrl_update_msr(unsigned > long

[Patch v7 10/18] x86/speculation: Turn on or off STIBP according to a task's TIF_STIBP

2018-11-20 Thread Tim Chen
If STIBP is used all the time, tasks that do not need STIBP protection will get unnecessarily slowed down by STIBP. To apply STIBP only to tasks that need it, a new task TIF_STIBP flag is created. A x86 CPU uses STIBP only for tasks labeled with TIF_STIBP. During context switch, this flag is

[Patch v7 10/18] x86/speculation: Turn on or off STIBP according to a task's TIF_STIBP

2018-11-20 Thread Tim Chen
If STIBP is used all the time, tasks that do not need STIBP protection will get unnecessarily slowed down by STIBP. To apply STIBP only to tasks that need it, a new task TIF_STIBP flag is created. A x86 CPU uses STIBP only for tasks labeled with TIF_STIBP. During context switch, this flag is