|
@@ -9720,8 +9720,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
|
|
|
* is no need to worry about the conditional branch over the wrmsr
|
|
|
* being speculatively taken.
|
|
|
*/
|
|
|
- if (vmx->spec_ctrl)
|
|
|
- native_wrmsrl(MSR_IA32_SPEC_CTRL, vmx->spec_ctrl);
|
|
|
+ x86_spec_ctrl_set_guest(vmx->spec_ctrl);
|
|
|
|
|
|
vmx->__launched = vmx->loaded_vmcs->launched;
|
|
|
|
|
@@ -9869,8 +9868,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
|
|
|
if (unlikely(!msr_write_intercepted(vcpu, MSR_IA32_SPEC_CTRL)))
|
|
|
vmx->spec_ctrl = native_read_msr(MSR_IA32_SPEC_CTRL);
|
|
|
|
|
|
- if (vmx->spec_ctrl)
|
|
|
- native_wrmsrl(MSR_IA32_SPEC_CTRL, 0);
|
|
|
+ x86_spec_ctrl_restore_host(vmx->spec_ctrl);
|
|
|
|
|
|
/* Eliminate branch target predictions from guest mode */
|
|
|
vmexit_fill_RSB();
|