Re: [patch RFC 5/5] x86/speculation: Add basic speculation control code

From: Dave Hansen
Date: Wed Jan 10 2018 - 10:00:02 EST


On 01/10/2018 06:10 AM, Andrea Arcangeli wrote:
> Tim and Dave please comment too, Tim you originally wrote that code
> that leaves IBRS always on and never toggles it in the kernel entry
> point so you must know full well if Arjan is correct that you must
> toggle IBRS every time you enter kernel and in turn ibrs_enabled 2
> isn't valid mode.

Hi Andrea,

The "writing IBRS=1 acts as a barrier when it is already IBRS=1"
behavior is something which I misunderstood in the past. Thanks, Arjan,
for clearing it up.