Commit 742a2c5a authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Kleber Sacilotto de Souza

Revert "UBUNTU: SAUCE: Fix spec_ctrl support in KVM"

CVE-2017-5753 (revert embargoed)
CVE-2017-5715 (revert embargoed)

This reverts commit 86d33097.
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 63da13a9
......@@ -361,10 +361,6 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
F(ADX) | F(SMAP) | F(AVX512F) | F(AVX512PF) | F(AVX512ER) |
F(AVX512CD) | F(CLFLUSHOPT) | F(CLWB) | F(PCOMMIT);
/* cpuid 7.0.edx */
const u32 kvm_supported_7_0_edx_x86_features =
KF(SPEC_CTRL);
/* cpuid 0xD.1.eax */
const u32 kvm_supported_word10_x86_features =
F(XSAVEOPT) | F(XSAVEC) | F(XGETBV1) | f_xsaves;
......@@ -450,14 +446,11 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
cpuid_mask(&entry->ebx, 9);
// TSC_ADJUST is emulated
entry->ebx |= F(TSC_ADJUST);
entry->edx &= kvm_supported_7_0_edx_x86_features;
entry->edx &= get_scattered_cpuid_leaf(7, 0, 2);
} else {
} else
entry->ebx = 0;
entry->edx = 0;
}
entry->eax = 0;
entry->ecx = 0;
entry->edx = 0;
break;
}
case 9:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment