projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc5b7f3
)
KVM: x86: mask CPUID(0xD,0x1).EAX against host value
author
Paolo Bonzini
<pbonzini@redhat.com>
Mon, 21 Mar 2016 11:33:00 +0000
(12:33 +0100)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Sun, 10 Apr 2016 19:53:50 +0000
(21:53 +0200)
This ensures that the guest doesn't see XSAVE extensions
(e.g. xgetbv1 or xsavec) that the host lacks.
Cc: stable@vger.kernel.org
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/cpuid.c
b/arch/x86/kvm/cpuid.c
index 8efb839948e512e9aac6aaf544230195614297c1..bbbaa802d13efc8b1e57f7defa351cacb2aaab78 100644
(file)
--- a/
arch/x86/kvm/cpuid.c
+++ b/
arch/x86/kvm/cpuid.c
@@
-534,6
+534,7
@@
static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
do_cpuid_1_ent(&entry[i], function, idx);
if (idx == 1) {
entry[i].eax &= kvm_cpuid_D_1_eax_x86_features;
+ cpuid_mask(&entry[i].eax, CPUID_D_1_EAX);
entry[i].ebx = 0;
if (entry[i].eax & (F(XSAVES)|F(XSAVEC)))
entry[i].ebx =