]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/x86/kernel/smpboot.c
x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature
[mirror_ubuntu-artful-kernel.git] / arch / x86 / kernel / smpboot.c
index a652bff7add4349092ba0e63bb9f1fa0979cb6a9..9317aa4a74464fbede48fc4c7339a68de71c323d 100644 (file)
@@ -1693,14 +1693,14 @@ void native_play_dead(void)
        play_dead_common();
        tboot_shutdown(TB_SHUTDOWN_WFS);
 
-       if (boot_cpu_has(X86_FEATURE_SPEC_CTRL))
+       if (ibrs_inuse)
                native_wrmsrl(MSR_IA32_SPEC_CTRL, 0);
 
        mwait_play_dead();      /* Only returns on failure */
        if (cpuidle_play_dead())
                hlt_play_dead();
 
-       if (boot_cpu_has(X86_FEATURE_SPEC_CTRL))
+       if (ibrs_inuse)
                native_wrmsrl(MSR_IA32_SPEC_CTRL, FEATURE_ENABLE_IBRS);
 }