Re: [PATCH 5/5] x86/feature: Detect the x86 feature Indirect Branch Prediction Barrier

From: Tom Lendacky
Date: Fri Jan 12 2018 - 10:22:09 EST


On 1/12/2018 6:39 AM, Woodhouse, David wrote:
> On Fri, 2018-01-12 at 13:32 +0100, Borislav Petkov wrote:
>> On Thu, Jan 11, 2018 at 05:32:19PM -0800, Ashok Raj wrote:
>>> cpuid ax=0x7, return rdx bit 26 to indicate presence of both
>>> IA32_SPEC_CTRL(MSR 0x48) and IA32_PRED_CMD(MSR 0x49)
>>
>> So why do we need two X86_FEATURE flags then?
>
> AMD has only the latter and enumerates them differently.

Correct. Both 0x48 and 0x49 are tied to the same cpuid bit. AMD has
a separate cpuid bit for 0x49 (IBPB) alone.

Thanks,
Tom

>