X-Git-Url: https://git.proxmox.com/?p=mirror_ubuntu-artful-kernel.git;a=blobdiff_plain;f=arch%2Fx86%2Fkvm%2Fvmx.c;h=7a7bd88b2e14e01c4fd127d09dfa78d329d61e37;hp=8c638ef4f40917560008ac407becc87c52a2c617;hb=fe17061207ee371f0cd0f60162947deb9fd16d4a;hpb=3ef956ddb94ed8ee406947938955934da6102340 diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 8c638ef4f409..7a7bd88b2e14 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -9104,9 +9104,8 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) atomic_switch_perf_msrs(vmx); - if (ibrs_inuse) - add_atomic_switch_msr(vmx, MSR_IA32_SPEC_CTRL, - vcpu->arch.spec_ctrl, FEATURE_ENABLE_IBRS); + /* SMB: Ignore ibrs_inuse but rely on vcpu value */ + x86_spec_ctrl_set_guest(vcpu->arch.spec_ctrl); debugctlmsr = get_debugctlmsr(); @@ -9230,6 +9229,8 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) #endif ); + x86_spec_ctrl_restore_host(vcpu->arch.spec_ctrl); + /* Eliminate branch target predictions from guest mode */ vmexit_fill_RSB();