Skip to content

Commit 4f20998

Browse files
jsmattsonjrsean-jc
authored andcommitted
KVM: VMX: Guest usage of IA32_SPEC_CTRL is likely
At this point in time, most guests (in the default, out-of-the-box configuration) are likely to use IA32_SPEC_CTRL. Therefore, drop the compiler hint that it is unlikely for KVM to be intercepting WRMSR of IA32_SPEC_CTRL. Signed-off-by: Jim Mattson <jmattson@google.com> Reviewed-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20221019213620.1953281-2-jmattson@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 9cc4093 commit 4f20998

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/vmx/vmx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ unsigned int __vmx_vcpu_run_flags(struct vcpu_vmx *vmx)
858858
* to change it directly without causing a vmexit. In that case read
859859
* it after vmexit and store it in vmx->spec_ctrl.
860860
*/
861-
if (unlikely(!msr_write_intercepted(vmx, MSR_IA32_SPEC_CTRL)))
861+
if (!msr_write_intercepted(vmx, MSR_IA32_SPEC_CTRL))
862862
flags |= VMX_RUN_SAVE_SPEC_CTRL;
863863

864864
return flags;

0 commit comments

Comments
 (0)