Commit a334c78c authored by Stefan Bader's avatar Stefan Bader

UBUNTU: SAUCE: kvm/cpuid: Fix CPUID_7_0.EDX handling

Initially all the SPEC_CTRL related bits were added to the scattered
feature word and that was used to sync between host and guest.
But now upstream has extended the feature words and moved all related
bits there. Because of that we have to change the handler code as well.

CVE-2018-3639 (x86)

[smb: tracked in private lp 1772146]
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 6256713c
...@@ -447,7 +447,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, ...@@ -447,7 +447,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
// TSC_ADJUST is emulated // TSC_ADJUST is emulated
entry->ebx |= F(TSC_ADJUST); entry->ebx |= F(TSC_ADJUST);
entry->edx &= kvm_supported_7_0_edx_x86_features; entry->edx &= kvm_supported_7_0_edx_x86_features;
entry->edx &= get_scattered_cpuid_leaf(7, 0, 2); cpuid_mask(&entry->edx, 16);
} else { } else {
entry->ebx = 0; entry->ebx = 0;
entry->edx = 0; entry->edx = 0;
......
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