Patch "KVM: x86: Mask off reserved bits in CPUID.80000001H" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    KVM: x86: Mask off reserved bits in CPUID.80000001H

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.80000001h.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 0469e56a14bf8cfb80507e51b7aeec0332cdbc13 Mon Sep 17 00:00:00 2001
From: Jim Mattson <jmattson@xxxxxxxxxx>
Date: Fri, 30 Sep 2022 00:51:58 +0200
Subject: KVM: x86: Mask off reserved bits in CPUID.80000001H

From: Jim Mattson <jmattson@xxxxxxxxxx>

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@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 arch/x86/kvm/cpuid.c |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -902,6 +902,7 @@ static inline int __do_cpuid_func(struct
 		entry->eax = min(entry->eax, 0x8000001f);
 		break;
 	case 0x80000001:
+		entry->ebx &= ~GENMASK(27, 16);
 		cpuid_entry_override(entry, CPUID_8000_0001_EDX);
 		cpuid_entry_override(entry, CPUID_8000_0001_ECX);
 		break;


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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux