]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/spectre: Now that we expose 'stbibp' make sure it is correct.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 2 Feb 2018 17:34:19 +0000 (12:34 -0500)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 8 Feb 2018 18:16:47 +0000 (10:16 -0800)
Right now it is 'stipb' but that is not correct. It should
be 'stibp'

Orabug: 27477743
CVE: CVE-2017-5715

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
arch/x86/include/asm/cpufeature.h
arch/x86/kernel/cpu/scattered.c
arch/x86/kvm/cpuid.c

index 316b14fd0416ac02d00e0656243315b98d46372b..e61e725ec000d80908a76c7584c324fa23384a1f 100644 (file)
 #define X86_FEATURE_INTEL_PT   ( 7*32+15) /* Intel Processor Trace */
 #define X86_FEATURE_RSB_CTXSW  ( 7*32+19) /* "" Fill RSB on context switches */
 #define X86_FEATURE_IBRS       ( 7*32+20) /* Control Speculation Control */
-#define X86_FEATURE_STIPB      ( 7*32+21) /* Single Thread Indirect Branch Predictors */
+#define X86_FEATURE_STIBP      ( 7*32+21) /* Single Thread Indirect Branch Predictors */
 #define X86_FEATURE_IA32_ARCH_CAPS     ( 7*32+22) /* Control Speculation Control */
 #define X86_FEATURE_IBRS_ATT   ( 7*32+23) /* IBRS all the time */
 
index c1b207f5262fa4208c54186c52b8098df9e942ea..29730c8995347fbb56ba1285cfc3aae7fd35b956 100644 (file)
@@ -50,7 +50,7 @@ void init_scattered_cpuid_features(struct cpuinfo_x86 *c)
                { X86_FEATURE_CPB,              CR_EDX, 9, 0x80000007, 0 },
                { X86_FEATURE_PROC_FEEDBACK,    CR_EDX,11, 0x80000007, 0 },
                { X86_FEATURE_IBRS,             CR_EDX,26, 0x00000007, 0 },
-               { X86_FEATURE_STIPB,            CR_EDX,27, 0x00000007, 0 },
+               { X86_FEATURE_STIBP,            CR_EDX,27, 0x00000007, 0 },
                { X86_FEATURE_IA32_ARCH_CAPS,   CR_EDX,29, 0x00000007, 0 },
                { X86_FEATURE_NPT,              CR_EDX, 0, 0x8000000a, 0 },
                { X86_FEATURE_LBRV,             CR_EDX, 1, 0x8000000a, 0 },
index aa49b40b1da8a67f1e965cd76b45bc02c3843dae..099bc7a57018c1dbc28c16946c24560da72c0189 100644 (file)
@@ -445,7 +445,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
                        /* Aka !ibrs_supported and !ibpb_supported */
                        if ( !boot_cpu_has(X86_FEATURE_IBRS) )
                                entry->edx &= !(1u << KVM_CPUID_BIT_IBRS);
-                       if ( !boot_cpu_has(X86_FEATURE_STIPB) )
+                       if ( !boot_cpu_has(X86_FEATURE_STIBP) )
                                entry->edx &= !(1u << KVM_CPUID_BIT_STIBP);
                } else {
                        entry->ebx = 0;