]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Revert "x86/svm: Set IBPB when running a different VCPU"
authorAndy Whitcroft <apw@canonical.com>
Wed, 31 Jan 2018 15:38:01 +0000 (15:38 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 5 Feb 2018 15:52:55 +0000 (16:52 +0100)
CVE-2017-5753 (revert embargoed)
CVE-2017-5715 (revert embargoed)

This reverts commit 0ba3eaabbb6666ebd344ee80534e58c375a00810.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/kvm/svm.c

index fe90956bdf1ba4f043ce6494ad6990a9755b05a4..79ab4d85afe37fea55e3184f19dcb7aaca1f90bc 100644 (file)
@@ -518,8 +518,6 @@ struct svm_cpu_data {
        struct kvm_ldttss_desc *tss_desc;
 
        struct page *save_area;
-
-       struct vmcb *current_vmcb;
 };
 
 static DEFINE_PER_CPU(struct svm_cpu_data *, svm_data);
@@ -1687,19 +1685,11 @@ static void svm_free_vcpu(struct kvm_vcpu *vcpu)
        __free_pages(virt_to_page(svm->nested.msrpm), MSRPM_ALLOC_ORDER);
        kvm_vcpu_uninit(vcpu);
        kmem_cache_free(kvm_vcpu_cache, svm);
-
-       /*
-        * The VMCB could be recycled, causing a false negative in svm_vcpu_load;
-        * block speculative execution.
-        */
-       if (ibpb_inuse)
-               wrmsrl(MSR_IA32_PRED_CMD, FEATURE_SET_IBPB);
 }
 
 static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 {
        struct vcpu_svm *svm = to_svm(vcpu);
-       struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
        int i;
 
        if (unlikely(cpu != vcpu->cpu)) {
@@ -1728,12 +1718,6 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
        if (static_cpu_has(X86_FEATURE_RDTSCP))
                wrmsrl(MSR_TSC_AUX, svm->tsc_aux);
 
-       if (sd->current_vmcb != svm->vmcb) {
-               sd->current_vmcb = svm->vmcb;
-               if (ibpb_inuse)
-                       wrmsrl(MSR_IA32_PRED_CMD, FEATURE_SET_IBPB);
-       }
-
        avic_vcpu_load(vcpu, cpu);
 }