Merge tag 'block-6.1-2022-11-11' of git://git.kernel.dk/linux
[linux-block.git] / arch / x86 / kernel / cpu / bugs.c
index da7c361f47e0d9ab39ec4b0f63eb326baa44a842..3e3230cccaa7948b9bb266f2c71732ede97f767e 100644 (file)
@@ -196,22 +196,15 @@ void __init check_bugs(void)
 }
 
 /*
- * NOTE: This function is *only* called for SVM.  VMX spec_ctrl handling is
- * done in vmenter.S.
+ * NOTE: This function is *only* called for SVM, since Intel uses
+ * MSR_IA32_SPEC_CTRL for SSBD.
  */
 void
-x86_virt_spec_ctrl(u64 guest_spec_ctrl, u64 guest_virt_spec_ctrl, bool setguest)
+x86_virt_spec_ctrl(u64 guest_virt_spec_ctrl, bool setguest)
 {
-       u64 msrval, guestval = guest_spec_ctrl, hostval = spec_ctrl_current();
+       u64 guestval, hostval;
        struct thread_info *ti = current_thread_info();
 
-       if (static_cpu_has(X86_FEATURE_MSR_SPEC_CTRL)) {
-               if (hostval != guestval) {
-                       msrval = setguest ? guestval : hostval;
-                       wrmsrl(MSR_IA32_SPEC_CTRL, msrval);
-               }
-       }
-
        /*
         * If SSBD is not handled in MSR_SPEC_CTRL on AMD, update
         * MSR_AMD64_L2_CFG or MSR_VIRT_SPEC_CTRL if supported.