]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: x86: Mask off reserved bits in CPUID.8000001AH
authorJim Mattson <jmattson@google.com>
Thu, 29 Sep 2022 22:52:01 +0000 (15:52 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 6 Dec 2022 13:45:46 +0000 (14:45 +0100)
commit0a1d57166a857c8098080da7bab41aa0fbf2deda
tree777b93fc93f29cc44a837429d38398e965d74ff4
parenteea924572e81830f899f91687c41fbc686ba37db
KVM: x86: Mask off reserved bits in CPUID.8000001AH

BugLink: https://bugs.launchpad.net/bugs/1998843
commit 079f6889818dd07903fb36c252532ab47ebb6d48 upstream.

KVM_GET_SUPPORTED_CPUID should only enumerate features that KVM
actually supports. In the case of CPUID.8000001AH, only three bits are
currently defined. The 125 reserved bits should be masked off.

Fixes: 24c82e576b78 ("KVM: Sanitize cpuid")
Signed-off-by: Jim Mattson <jmattson@google.com>
Message-Id: <20220929225203.2234702-4-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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/kvm/cpuid.c