From: Konrad Rzeszutek Wilk Date: Thu, 11 Jan 2018 22:34:33 +0000 (-0500) Subject: x86/spec: Always set IBRS to guest value on VMENTER and host on VMEXIT (redux) X-Git-Tag: v4.1.12-124.31.3~1275 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=edf4b33e9f50537598637ab35598536343394947;p=users%2Fjedix%2Flinux-maple.git x86/spec: Always set IBRS to guest value on VMENTER and host on VMEXIT (redux) The commit bc5d49f8ee73ddf252f8a4ed106643abed3bb4d6 that was pulled was a bit stale and missing an important change. We will set the IBRS to 0 unconditionally on VMENTER. Orabug: 27378451 Reported-by: Liran Alon Reviewed-by: Liran Alon Reviewed-by: Boris Ostrovsky Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Brian Maly Signed-off-by: Kirtikar Kashyap --- diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 0ce64443f9ef5..3d6da9efdda79 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -8192,8 +8192,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) vmx->__launched = vmx->loaded_vmcs->launched; - if (ibrs_inuse && - vmx->spec_ctrl != SPEC_CTRL_FEATURE_ENABLE_IBRS) + if (ibrs_inuse) wrmsrl(MSR_IA32_SPEC_CTRL, vmx->spec_ctrl); asm(