Re: [PATCH v4 7/7] x86/speculation: Add basic IBPB (Indirect Branch Prediction Barrier) support

From: David Woodhouse
Date: Thu Jan 25 2018 - 07:12:14 EST


On Thu, 2018-01-25 at 13:03 +0100, Borislav Petkov wrote:
> On Thu, Jan 25, 2018 at 11:58:20AM +0000, David Woodhouse wrote:
> > They're immediates, not registers. So it's like the first example
> in...
>
> Oh, I know very well what they are - I simply find the macro more
> readable if there are less or no arguments.

Oh, I agree, but having to write 0x49 there instead of
MSR_IA32_PRED_CMD was a more pressing reason *not* to change it.

There are possibly macro hacks that can make that work (the first naÃve
attempt didn't) but it exceeded my boredom threshold fairly rapidly.

If you send me a version which still uses MSR_IA32_PRED_CMD and
PRED_CMD_IBPB instead of hard-coding the numbers, and which doesn't end
up with piles of __stringify() and similar crap to do so, I'll happily
change it.

Attachment: smime.p7s
Description: S/MIME cryptographic signature