]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
KVM: x86: mask CPUID(0xD,0x1).EAX against host value
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Mar 2016 11:33:00 +0000 (12:33 +0100)
committerKamal Mostafa <kamal@canonical.com>
Fri, 10 Jun 2016 13:32:25 +0000 (06:32 -0700)
commitd14ab851f9f012c0b9a7bb6750643ebb17657cca
treee1cdadb2e9fb89e7ef0a722c1f711318723b4282
parentd1afc879ede65bff513f1fed4db3847d5e3c3d97
KVM: x86: mask CPUID(0xD,0x1).EAX against host value

BugLink: http://bugs.launchpad.net/bugs/1588945
commit 316314cae15fb0e3869b76b468f59a0c83ac3d4e upstream.

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>
[4.5 does have CPUID_D_1_EAX, but earlier kernels don't, so use
 the numeric value.  This is consistent with other occurrences
 of cpuid_mask in arch/x86/kvm/cpuid.c - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
arch/x86/kvm/cpuid.c