This is a note to let you know that I've just added the patch titled KVM: x86: Mask off reserved bits in CPUID.8000001FH to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kvm-x86-mask-off-reserved-bits-in-cpuid.8000001fh.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 86c4f0d547f6460d0426ebb3ba0614f1134b8cda Mon Sep 17 00:00:00 2001 From: Jim Mattson <jmattson@xxxxxxxxxx> Date: Thu, 29 Sep 2022 15:52:03 -0700 Subject: KVM: x86: Mask off reserved bits in CPUID.8000001FH From: Jim Mattson <jmattson@xxxxxxxxxx> commit 86c4f0d547f6460d0426ebb3ba0614f1134b8cda upstream. KVM_GET_SUPPORTED_CPUID should only enumerate features that KVM actually supports. CPUID.8000001FH:EBX[31:16] are reserved bits and should be masked off. Fixes: 8765d75329a3 ("KVM: X86: Extend CPUID range to include new leaf") Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx> Message-Id: <20220929225203.2234702-6-jmattson@xxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx [Clear NumVMPL too. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -968,7 +968,8 @@ static inline int __do_cpuid_func(struct entry->eax = entry->ebx = entry->ecx = entry->edx = 0; } else { cpuid_entry_override(entry, CPUID_8000_001F_EAX); - + /* Clear NumVMPL since KVM does not support VMPL. */ + entry->ebx &= ~GENMASK(31, 12); /* * Enumerate '0' for "PA bits reduction", the adjusted * MAXPHYADDR is enumerated directly (see 0x80000008). Patches currently in stable-queue which might be from jmattson@xxxxxxxxxx are queue-5.15/kvm-x86-mask-off-reserved-bits-in-cpuid.80000008h.patch queue-5.15/kvm-x86-mask-off-reserved-bits-in-cpuid.80000006h.patch queue-5.15/kvm-x86-mask-off-reserved-bits-in-cpuid.80000001h.patch queue-5.15/kvm-x86-mask-off-reserved-bits-in-cpuid.8000001ah.patch queue-5.15/kvm-x86-mask-off-reserved-bits-in-cpuid.8000001fh.patch