KVM: x86: Mask off reserved bits in CPUID.80000001H
authorJim Mattson <jmattson@google.com>
Thu, 29 Sep 2022 22:51:58 +0000 (00:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 17:14:28 +0000 (18:14 +0100)
commite0c7410378cd1adbfd35a65faca5df8936631b1a
tree782350a948c0876b744e1c43e2bd6367198ea8d1
parent9302ebc1c21d93ef7004cd228c8b493dc64f7194
KVM: x86: Mask off reserved bits in CPUID.80000001H

commit 0469e56a14bf8cfb80507e51b7aeec0332cdbc13 upstream.

KVM_GET_SUPPORTED_CPUID should only enumerate features that KVM
actually supports. CPUID.80000001:EBX[27:16] are reserved bits and
should be masked off.

Fixes: 0771671749b5 ("KVM: Enhance guest cpuid management")
Signed-off-by: Jim Mattson <jmattson@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/cpuid.c