Skip to content

Commit e9c9eec

Browse files
committed
Merge branch 'x86-cpufeature-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cpufeature updates from Ingo Molnar: "The main changes in this cycle were: - Continued cleanups of CPU bugs mis-marked as 'missing features', by Borislav Petkov. - Detect the xsaves/xrstors feature and releated cleanup, by Fenghua Yu" * 'x86-cpufeature-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, cpu: Kill cpu_has_mp x86, amd: Cleanup init_amd x86/cpufeature: Add bug flags to /proc/cpuinfo x86, cpufeature: Convert more "features" to bugs x86/xsaves: Detect xsaves/xrstors feature x86/cpufeature.h: Reformat x86 feature macros
2 parents 19d402c + af0fa6f commit e9c9eec

11 files changed

Lines changed: 433 additions & 398 deletions

File tree

‎arch/x86/include/asm/apic.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static inline void native_apic_mem_write(u32 reg, u32 v)
9999
{
100100
volatile u32 *addr = (volatile u32 *)(APIC_BASE + reg);
101101

102-
alternative_io("movl %0, %1", "xchgl %0, %1", X86_FEATURE_11AP,
102+
alternative_io("movl %0, %1", "xchgl %0, %1", X86_BUG_11AP,
103103
ASM_OUTPUT2("=r" (v), "=m" (*addr)),
104104
ASM_OUTPUT2("0" (v), "m" (*addr)));
105105
}

‎arch/x86/include/asm/cpufeature.h‎

Lines changed: 210 additions & 199 deletions
Large diffs are not rendered by default.

‎arch/x86/include/asm/fpu-internal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static inline int restore_fpu_checking(struct task_struct *tsk)
293293
/* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception
294294
is pending. Clear the x87 state here by setting it to fixed
295295
values. "m" is a random variable that should be in L1 */
296-
if (unlikely(static_cpu_has_safe(X86_FEATURE_FXSAVE_LEAK))) {
296+
if (unlikely(static_cpu_has_bug_safe(X86_BUG_FXSAVE_LEAK))) {
297297
asm volatile(
298298
"fnclex\n\t"
299299
"emms\n\t"

‎arch/x86/include/asm/mwait.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static inline void __mwait(unsigned long eax, unsigned long ecx)
4343
static inline void mwait_idle_with_hints(unsigned long eax, unsigned long ecx)
4444
{
4545
if (!current_set_polling_and_test()) {
46-
if (static_cpu_has(X86_FEATURE_CLFLUSH_MONITOR)) {
46+
if (static_cpu_has_bug(X86_BUG_CLFLUSH_MONITOR)) {
4747
mb();
4848
clflush((void *)&current_thread_info()->flags);
4949
mb();

‎arch/x86/include/uapi/asm/msr-index.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@
297297
#define MSR_IA32_TSC_ADJUST 0x0000003b
298298
#define MSR_IA32_BNDCFGS 0x00000d90
299299

300+
#define MSR_IA32_XSS 0x00000da0
301+
300302
#define FEATURE_CONTROL_LOCKED (1<<0)
301303
#define FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX (1<<1)
302304
#define FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX (1<<2)

0 commit comments

Comments
 (0)